|
@@ -9,50 +9,131 @@
|
|
|
</template>
|
|
|
</Minheader>
|
|
|
<div class="diacont">
|
|
|
- <el-form :model="tableForm" class="w100 fw" :rules="formRules" ref="warningEditsForm">
|
|
|
+ <el-form
|
|
|
+ :model="tableForm"
|
|
|
+ class="w100 fw"
|
|
|
+ :rules="formRules"
|
|
|
+ ref="warningEditsForm"
|
|
|
+ >
|
|
|
<!-- <div class="outersurface pd30">
|
|
|
<el-form-item label="策略名称" size="default">
|
|
|
<el-input v-model="tableForm.name" placeholder="请输入策略名称" />
|
|
|
</el-form-item>
|
|
|
</div> -->
|
|
|
<div class="outersurface pd30">
|
|
|
- <el-form-item label="航司二字码" size="default" prop="IATACode" :rules="formRules.isNotNull">
|
|
|
- <el-select style="width: 100%" v-model="tableForm.IATACode" class="input-shadow" filterable default-first-option clearable placeholder="请选择航司二字码">
|
|
|
- <el-option v-for="item in iaCodeArr" :key="item.airlineCompanyID" :label="item.ITATCode" :value="item.ITATCode">
|
|
|
+ <el-form-item
|
|
|
+ label="航司二字码"
|
|
|
+ size="default"
|
|
|
+ prop="IATACode"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="tableForm.IATACode"
|
|
|
+ class="input-shadow"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择航司二字码"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in iaCodeArr"
|
|
|
+ :key="item.airlineCompanyID"
|
|
|
+ :label="item.ITATCode"
|
|
|
+ :value="item.ITATCode"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="outersurface pd30">
|
|
|
<el-form-item label="起飞机场" size="default">
|
|
|
- <el-select style="width: 100%" v-model="tableForm.departmentAirport" class="input-shadow" filterable default-first-option clearable placeholder="请选择起飞机场">
|
|
|
- <el-option v-for="item in tableOption" :key="item.airportID" :label="item.airportName" :value="item.IATACode">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="tableForm.departmentAirport"
|
|
|
+ class="input-shadow"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择起飞机场"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tableOption"
|
|
|
+ :key="item.airportID"
|
|
|
+ :label="item.airportName"
|
|
|
+ :value="item.IATACode"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="outersurface pd30">
|
|
|
<el-form-item label="降落机场" size="default">
|
|
|
- <el-select style="width: 100%" v-model="tableForm.landingAirport" class="input-shadow" filterable default-first-option clearable placeholder="请选择降落机场">
|
|
|
- <el-option v-for="item in tableOption" :key="item.airportID" :label="item.airportName" :value="item.IATACode">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="tableForm.landingAirport"
|
|
|
+ class="input-shadow"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择降落机场"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tableOption"
|
|
|
+ :key="item.airportID"
|
|
|
+ :label="item.airportName"
|
|
|
+ :value="item.IATACode"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="outersurface">
|
|
|
- <el-form-item label="航班号" size="default" prop="flightNo" :rules="formRules.isNotNull">
|
|
|
- <el-input v-model="tableForm.flightNo" placeholder="请输入航班号" />
|
|
|
+ <el-form-item
|
|
|
+ label="航班号"
|
|
|
+ size="default"
|
|
|
+ prop="flightNo"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="tableForm.flightNo"
|
|
|
+ placeholder="请输入航班号"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="outersurface pd30">
|
|
|
- <el-form-item label="生效时间" size="default" prop="startDate" :rules="formRules.isNotNull">
|
|
|
- <el-date-picker v-model="tableForm.startDate" :rows="1" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择日期时间">
|
|
|
+ <el-form-item
|
|
|
+ label="生效时间"
|
|
|
+ size="default"
|
|
|
+ prop="startDate"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ v-model="tableForm.startDate"
|
|
|
+ :rows="1"
|
|
|
+ type="datetime"
|
|
|
+ format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="outersurface pd30">
|
|
|
- <el-form-item label="失效时间" size="default" prop="endDate" :rules="formRules.isNotNull">
|
|
|
- <el-date-picker format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" v-model="tableForm.endDate" :rows="1" type="datetime" placeholder="选择日期时间">
|
|
|
+ <el-form-item
|
|
|
+ label="失效时间"
|
|
|
+ size="default"
|
|
|
+ prop="endDate"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ v-model="tableForm.endDate"
|
|
|
+ :rows="1"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -60,7 +141,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="centerBox">
|
|
|
- <Minheader :is-auth="true" :is-statuser="true" :is-Search="false" powerData="add_alert_policy_button" @addForm="addForm" style="margin-top: 20px">
|
|
|
+ <Minheader
|
|
|
+ :is-auth="true"
|
|
|
+ :is-statuser="true"
|
|
|
+ :is-Search="false"
|
|
|
+ powerData="add_alert_policy_button"
|
|
|
+ @addForm="addForm"
|
|
|
+ style="margin-top: 20px"
|
|
|
+ >
|
|
|
<template #header>
|
|
|
<div class="status flex-wrap">
|
|
|
<div class="manageTitle">预警告警策略</div>
|
|
@@ -69,70 +157,186 @@
|
|
|
</Minheader>
|
|
|
</div>
|
|
|
<div class="containers scroll-y">
|
|
|
- <DataTable :tableHeader="tableCols" :tableData="tableData" :tableBtnGroup="tableBtnGroup" :tableProperty="{ rowKey: 'ID' }" @btnClick="btnClick" />
|
|
|
+ <DataTable
|
|
|
+ :tableHeader="tableCols"
|
|
|
+ :tableData="tableData"
|
|
|
+ :tableBtnGroup="tableBtnGroup"
|
|
|
+ :tableProperty="{ rowKey: 'ID' }"
|
|
|
+ @btnClick="btnClick"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <Dialog width="600px" :flag="flag" :type="type" :msgTitle="msgTitle" :delName="delName" @resetForm="resetForm" @delRest="delRest" @submitForm="submitForm" @delRemove="delRemove">
|
|
|
+ <Dialog
|
|
|
+ width="600px"
|
|
|
+ :flag="flag"
|
|
|
+ :type="type"
|
|
|
+ :msgTitle="msgTitle"
|
|
|
+ :delName="delName"
|
|
|
+ @resetForm="resetForm"
|
|
|
+ @delRest="delRest"
|
|
|
+ @submitForm="submitForm"
|
|
|
+ @delRemove="delRemove"
|
|
|
+ >
|
|
|
<div class="diacont">
|
|
|
<el-form :model="tableForms" :rules="formRules" ref="warningEditForm">
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="策略名称" size="default" prop="StrategyName" :rules="formRules.isNotNull">
|
|
|
- <el-input v-model="tableForms.StrategyName" placeholder="请输入策略名称" />
|
|
|
+ <el-form-item
|
|
|
+ label="策略名称"
|
|
|
+ size="default"
|
|
|
+ prop="StrategyName"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="tableForms.StrategyName"
|
|
|
+ placeholder="请输入策略名称"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="计算依据" size="default">
|
|
|
- <el-select style="width: 100%" v-model="tableForms.calculationBasis" class="input-shadow" filterable default-first-option clearable placeholder="请选择计算依据">
|
|
|
- <el-option v-for="item in calculationBasis" :key="item.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="item.v ? item.v : item.planDepartureApt">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="tableForms.calculationBasis"
|
|
|
+ class="input-shadow"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择计算依据"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in calculationBasis"
|
|
|
+ :key="item.v ? item.v : item.planDepartureApt"
|
|
|
+ :label="item.k ? item.k : item.planDepartureApt"
|
|
|
+ :value="item.v ? item.v : item.planDepartureApt"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="预警时长" size="default" prop="warningDuration" :rules="formRules.isNotNull">
|
|
|
- <el-input v-model="tableForms.warningDuration" placeholder="请输入预警时长" />
|
|
|
+ <el-form-item
|
|
|
+ label="预警时长"
|
|
|
+ size="default"
|
|
|
+ prop="warningDuration"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="tableForms.warningDuration"
|
|
|
+ placeholder="请输入预警时长"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="报警时长" size="default" prop="alarmDuration" :rules="formRules.isNotNull">
|
|
|
- <el-input v-model="tableForms.alarmDuration" placeholder="请输入报警时长" />
|
|
|
+ <el-form-item
|
|
|
+ label="报警时长"
|
|
|
+ size="default"
|
|
|
+ prop="alarmDuration"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="tableForms.alarmDuration"
|
|
|
+ placeholder="请输入报警时长"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="开始节点" size="default">
|
|
|
- <el-select style="width: 100%" v-model="tableForms.beginNode" class="input-shadow" filterable default-first-option clearable placeholder="请选择开始节点" @change="changeSelect">
|
|
|
- <el-option v-for="item in tableOptionser" :key="item.nodeID" :label="item.nodeName" :value="item.nodeCode">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="tableForms.beginNode"
|
|
|
+ class="input-shadow"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择开始节点"
|
|
|
+ @change="changeSelect"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tableOptionser"
|
|
|
+ :key="item.nodeID"
|
|
|
+ :label="item.nodeName"
|
|
|
+ :value="item.nodeCode"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="开始位置" size="default">
|
|
|
- <el-select style="width: 100%" v-model="tableForms.beginPosition" class="input-shadow" filterable default-first-option clearable placeholder="请选择开始位置" @change="changebegin">
|
|
|
- <el-option v-for="item in tableOptionbegin" :key="item.positionID" :label="item.positionDescribe" :value="item.locationCode">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="tableForms.beginPosition"
|
|
|
+ class="input-shadow"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择开始位置"
|
|
|
+ @change="changebegin"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tableOptionbegin"
|
|
|
+ :key="item.positionID"
|
|
|
+ :label="item.positionDescribe"
|
|
|
+ :value="item.locationCode"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="结束节点" size="default">
|
|
|
- <el-select style="width: 100%" v-model="tableForms.endNode" class="input-shadow" filterable default-first-option clearable placeholder="请选择结束节点" @change="changeSelected">
|
|
|
- <el-option v-for="item in tableOptionser" :key="item.nodeID" :label="item.nodeName" :value="item.nodeCode">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="tableForms.endNode"
|
|
|
+ class="input-shadow"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择结束节点"
|
|
|
+ @change="changeSelected"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tableOptionser"
|
|
|
+ :key="item.nodeID"
|
|
|
+ :label="item.nodeName"
|
|
|
+ :value="item.nodeCode"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="结束位置" size="default">
|
|
|
- <el-select style="width: 100%" v-model="tableForms.endPosition" class="input-shadow" filterable default-first-option clearable placeholder="请选择结束位置" @change="changeEndPos">
|
|
|
- <el-option v-for="item in tableOptionbegin" :key="item.positionID" :label="item.positionDescribe" :value="item.locationCode">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="tableForms.endPosition"
|
|
|
+ class="input-shadow"
|
|
|
+ filterable
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
+ placeholder="请选择结束位置"
|
|
|
+ @change="changeEndPos"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tableOptionbegin"
|
|
|
+ :key="item.positionID"
|
|
|
+ :label="item.positionDescribe"
|
|
|
+ :value="item.locationCode"
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="数量报警百分比" label-width="120" size="default">
|
|
|
- <el-input v-model="tableForms.percentage" placeholder="请输入数量报警百分比" />
|
|
|
+ <el-form-item
|
|
|
+ label="数量报警百分比"
|
|
|
+ label-width="120"
|
|
|
+ size="default"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="tableForms.percentage"
|
|
|
+ placeholder="请输入数量报警百分比"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -180,7 +384,7 @@ const tableForm = reactive({
|
|
|
event: 2,
|
|
|
}); //报警预警场景
|
|
|
const tableForms = reactive<any>({
|
|
|
- alarmStrategyID: "",
|
|
|
+ alarmStrategyID: null,
|
|
|
StrategyName: "",
|
|
|
calculationBasis: "",
|
|
|
warningDuration: "",
|
|
@@ -242,7 +446,7 @@ const addForm = () => {
|
|
|
//取消
|
|
|
const resetForm = () => {
|
|
|
flag.value = false;
|
|
|
- tableForms.alarmStrategyID = "";
|
|
|
+ tableForms.alarmStrategyID = null;
|
|
|
tableForms.StrategyName = "";
|
|
|
tableForms.calculationBasis = "";
|
|
|
tableForms.warningDuration = "";
|
|
@@ -255,9 +459,9 @@ const resetForm = () => {
|
|
|
delName.value = "";
|
|
|
};
|
|
|
const delRemove = async () => {
|
|
|
- tableForms.event = 3;
|
|
|
+ // tableForms.event = 3;
|
|
|
const { code, message } = await dataToChange(
|
|
|
- DATACONTENT_ID.sysServiceClId,
|
|
|
+ DATACONTENT_ID.sysServiceClIds,
|
|
|
tableForms,
|
|
|
3
|
|
|
);
|
|
@@ -299,18 +503,29 @@ const btnClick = (row, index, param) => {
|
|
|
msgTitle.value = "删除报警预警策略";
|
|
|
flag.value = true;
|
|
|
type.value = "del";
|
|
|
- tableForms.event = 3;
|
|
|
+ // tableForms.event = 3;
|
|
|
delName.value = index.StrategyName;
|
|
|
tableForms.alarmStrategyID = index.alarmStrategyID;
|
|
|
- tableForms.StrategyName = index.StrategyName;
|
|
|
- tableForms.calculationBasis = index.calculationBasis;
|
|
|
- tableForms.warningDuration = index.warningDuration;
|
|
|
- tableForms.alarmDuration = index.alarmDuration;
|
|
|
- tableForms.beginNode = index.beginNode;
|
|
|
- tableForms.beginPosition = index.beginPosition;
|
|
|
- tableForms.endNode = index.endNode;
|
|
|
- tableForms.endPosition = index.endPosition;
|
|
|
- tableForms.percentage = index.percentage;
|
|
|
+ delete tableForms.StrategyName;
|
|
|
+ delete tableForms.calculationBasis;
|
|
|
+ delete tableForms.warningDuration;
|
|
|
+ delete tableForms.alarmDuration;
|
|
|
+ delete tableForms.beginNode;
|
|
|
+ delete tableForms.endNode;
|
|
|
+ delete tableForms.endPosition;
|
|
|
+ delete tableForms.percentage;
|
|
|
+ delete tableForms.beginPosition;
|
|
|
+ delete tableForms.alarmSceneId;
|
|
|
+ delete tableForms.event;
|
|
|
+ // tableForms.StrategyName = index.StrategyName;
|
|
|
+ // tableForms.calculationBasis = index.calculationBasis;
|
|
|
+ // tableForms.warningDuration = index.warningDuration;
|
|
|
+ // tableForms.alarmDuration = index.alarmDuration;
|
|
|
+ // tableForms.beginNode = index.beginNode;
|
|
|
+ // tableForms.beginPosition = index.beginPosition;
|
|
|
+ // tableForms.endNode = index.endNode;
|
|
|
+ // tableForms.endPosition = index.endPosition;
|
|
|
+ // tableForms.percentage = index.percentage;
|
|
|
} else if (param === 4) {
|
|
|
}
|
|
|
};
|
|
@@ -593,9 +808,13 @@ const submitForm = () => {
|
|
|
const event = type.value == "add" ? 1 : 2;
|
|
|
const { code, message } =
|
|
|
event == 1
|
|
|
- ? await dataToChange(DATACONTENT_ID.sysServiceClId, tableForms, event)
|
|
|
+ ? await dataToChange(
|
|
|
+ DATACONTENT_ID.sysServiceClIds,
|
|
|
+ tableForms,
|
|
|
+ event
|
|
|
+ )
|
|
|
: await dataToChange(
|
|
|
- DATACONTENT_ID.sysServiceClId,
|
|
|
+ DATACONTENT_ID.sysServiceClIds,
|
|
|
tableForms,
|
|
|
event,
|
|
|
"alarmSceneId"
|
|
@@ -667,7 +886,7 @@ const preserForm = async () => {
|
|
|
warningEditsForm.value.validate(async (valid: any) => {
|
|
|
if (valid) {
|
|
|
const { code, message } = await dataToChange(
|
|
|
- DATACONTENT_ID.sysServiceCjId,
|
|
|
+ DATACONTENT_ID.sysServiceCjIds,
|
|
|
tableForm,
|
|
|
2,
|
|
|
"alarmSceneId"
|