|
@@ -17,13 +17,16 @@
|
|
|
</div> -->
|
|
|
<div class="outersurface pd30">
|
|
|
<el-form-item label="航司二字码" size="default" prop="IATACode" :rules="formRules.isNotNull">
|
|
|
- <el-input v-model="tableForm.IATACode" placeholder="请输入航司二字码" />
|
|
|
+ <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.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="item.v ? item.v : item.planDepartureApt">
|
|
|
+ <el-option v-for="item in tableOption" :key="item.airportID" :label="item.airportName" :value="item.IATACode">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -31,7 +34,7 @@
|
|
|
<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.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="item.v ? item.v : item.planDepartureApt">
|
|
|
+ <el-option v-for="item in tableOption" :key="item.airportID" :label="item.airportName" :value="item.IATACode">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -98,7 +101,7 @@
|
|
|
<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.v" :label="item.k" :value="item.v">
|
|
|
+ <el-option v-for="item in tableOptionser" :key="item.nodeID" :label="item.nodeName" :value="item.nodeCode">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -106,7 +109,7 @@
|
|
|
<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.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="item.v ? item.v : item.planDepartureApt">
|
|
|
+ <el-option v-for="item in tableOptionbegin" :key="item.positionID" :label="item.positionDescribe" :value="item.locationCode">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -114,7 +117,7 @@
|
|
|
<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 tableOptionend" :key="item.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="item.v ? item.v : item.planDepartureApt">
|
|
|
+ <el-option v-for="item in tableOptionser" :key="item.nodeID" :label="item.nodeName" :value="item.nodeCode">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -122,7 +125,7 @@
|
|
|
<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 tableOptionendPos" :key="item.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="item.v ? item.v : item.planDepartureApt">
|
|
|
+ <el-option v-for="item in tableOptionbegin" :key="item.positionID" :label="item.positionDescribe" :value="item.locationCode">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -144,8 +147,9 @@ import _ from "lodash";
|
|
|
import Minheader from "@/components/minheader/index.vue";
|
|
|
import DataTable from "@/components/tableTemp/index.vue";
|
|
|
import Dialog from "@/components/dialog/index.vue";
|
|
|
-import { Query, GeneralDataReception } from "@/api/webApi";
|
|
|
+import { Query, GeneralDataReception, htQuery } from "@/api/webApi";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
+import { onMounted } from "vue";
|
|
|
const formRules = useElement().formRules;
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
@@ -154,6 +158,7 @@ const dataContent = ref<object>({});
|
|
|
const noMore = ref<boolean>(false);
|
|
|
const rowTitle = ref<string>("");
|
|
|
const tableCols = ref<any>([]); //表头数据
|
|
|
+const iaCodeArr = ref<any>([]); //航司二字码
|
|
|
const serviceId = ref<string | any>("");
|
|
|
const beginPositionId = ref<string | any>("");
|
|
|
const endPositionId = ref<string | any>("");
|
|
@@ -270,41 +275,6 @@ const btnClick = (row, index, param) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return;
|
|
|
- calculationBasis.value.forEach((element) => {
|
|
|
- if (index.calculationBasis === element.k) {
|
|
|
- tableForms.calculationBasis = element.v;
|
|
|
- }
|
|
|
- });
|
|
|
- tableOptionser.value.forEach((element) => {
|
|
|
- if (index.beginNode === element.k) {
|
|
|
- tableForms.beginNode = element.v;
|
|
|
- }
|
|
|
- });
|
|
|
- tableOptionbegin.value.forEach((element) => {
|
|
|
- if (index.beginPosition === element.k) {
|
|
|
- tableForms.beginPosition = element.v;
|
|
|
- }
|
|
|
- });
|
|
|
- tableOptionend.value.forEach((element) => {
|
|
|
- if (index.endNode === element.k) {
|
|
|
- tableForms.endNode = element.v;
|
|
|
- }
|
|
|
- });
|
|
|
- tableOptionendPos.value.forEach((element) => {
|
|
|
- if (index.endPosition === element.k) {
|
|
|
- tableForms.endPosition = element.v;
|
|
|
- }
|
|
|
- });
|
|
|
- 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;
|
|
|
} else if (param === 3) {
|
|
|
msgTitle.value = "删除报警预警策略";
|
|
|
flag.value = true;
|
|
@@ -328,34 +298,19 @@ const btnClick = (row, index, param) => {
|
|
|
//获取预警报警场景(按照ID)
|
|
|
const sysServiceWarn = async () => {
|
|
|
try {
|
|
|
- let arr = [route.query.alarmSceneId];
|
|
|
- // arr.push(this.$route.query.id);
|
|
|
- const { code, returnData } = await Query({
|
|
|
- id: DATACONTENT_ID.sysServiceWarnId,
|
|
|
- dataContent: arr,
|
|
|
+ const result: any = await htQuery(DATACONTENT_ID.sysServiceCjId, {
|
|
|
+ alarmSceneId: route.query.alarmSceneId,
|
|
|
});
|
|
|
- if (code === "0") {
|
|
|
- tableForm.alarmSceneId = returnData.listValues[0].alarmSceneId
|
|
|
- ? returnData.listValues[0].alarmSceneId
|
|
|
- : "";
|
|
|
- tableForm.IATACode = returnData.listValues[0].IATACode
|
|
|
- ? returnData.listValues[0].IATACode
|
|
|
- : "";
|
|
|
- tableForm.departmentAirport = returnData.listValues[0].departmentAirport
|
|
|
- ? returnData.listValues[0].departmentAirport
|
|
|
- : "";
|
|
|
- tableForm.landingAirport = returnData.listValues[0].landingAirport
|
|
|
- ? returnData.listValues[0].landingAirport
|
|
|
- : "";
|
|
|
- tableForm.flightNo = returnData.listValues[0].flightNo
|
|
|
- ? returnData.listValues[0].flightNo
|
|
|
- : "";
|
|
|
- tableForm.startDate = returnData.listValues[0].startDate
|
|
|
- ? returnData.listValues[0].startDate
|
|
|
- : "";
|
|
|
- tableForm.endDate = returnData.listValues[0].endDate
|
|
|
- ? returnData.listValues[0].endDate
|
|
|
- : "";
|
|
|
+ if (result.length) {
|
|
|
+ const newVal = _.cloneDeep(result[0]);
|
|
|
+ for (const key in tableForm) {
|
|
|
+ console.log(key);
|
|
|
+ for (const p in newVal) {
|
|
|
+ if (key == p) {
|
|
|
+ tableForm[key] = newVal[p];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
// this.page--;
|
|
|
// this.$message.error.message;
|
|
@@ -389,15 +344,15 @@ const getSelectData = async (id, name, dataNme) => {
|
|
|
if (dataNme === "calculationBasis") {
|
|
|
calculationBasis.value = returnData.listValues;
|
|
|
}
|
|
|
- if (dataNme === "beginNode") {
|
|
|
- tableOptionser.value = returnData.listValues;
|
|
|
- } else if (dataNme === "beginPosition") {
|
|
|
- tableOptionbegin.value = returnData.listValues;
|
|
|
- } else if (dataNme === "endNode") {
|
|
|
- tableOptionend.value = returnData.listValues;
|
|
|
- } else if (dataNme === "endPosition") {
|
|
|
- tableOptionendPos.value = returnData.listValues;
|
|
|
- }
|
|
|
+ // if (dataNme === "beginNode") {
|
|
|
+ // tableOptionser.value = returnData.listValues;
|
|
|
+ // } else if (dataNme === "beginPosition") {
|
|
|
+ // tableOptionbegin.value = returnData.listValues;
|
|
|
+ // } else if (dataNme === "endNode") {
|
|
|
+ // tableOptionend.value = returnData.listValues;
|
|
|
+ // } else if (dataNme === "endPosition") {
|
|
|
+ // tableOptionendPos.value = returnData.listValues;
|
|
|
+ // }
|
|
|
} else {
|
|
|
}
|
|
|
};
|
|
@@ -426,23 +381,23 @@ const getQuery = async () => {
|
|
|
if (item.columnName === "calculationBasis") {
|
|
|
getSelectData(item.listqueryTemplateID, "", "calculationBasis");
|
|
|
}
|
|
|
- if (item.listqueryTemplateID && item.columnName === "beginNode") {
|
|
|
- getSelectData(item.listqueryTemplateID, "", "beginNode");
|
|
|
- } else if (
|
|
|
- item.listqueryTemplateID &&
|
|
|
- item.columnName === "beginPosition"
|
|
|
- ) {
|
|
|
- getSelectData(item.listqueryTemplateID, null, "beginPosition");
|
|
|
- beginPositionId.value = item.listqueryTemplateID;
|
|
|
- } else if (item.listqueryTemplateID && item.columnName === "endNode") {
|
|
|
- getSelectData(item.listqueryTemplateID, "", "endNode");
|
|
|
- } else if (
|
|
|
- item.listqueryTemplateID &&
|
|
|
- item.columnName === "endPosition"
|
|
|
- ) {
|
|
|
- getSelectData(item.listqueryTemplateID, null, "endPosition");
|
|
|
- endPositionId.value = item.listqueryTemplateID;
|
|
|
- }
|
|
|
+ // if (item.listqueryTemplateID && item.columnName === "beginNode") {
|
|
|
+ // getSelectData(item.listqueryTemplateID, "", "beginNode");
|
|
|
+ // } else if (
|
|
|
+ // item.listqueryTemplateID &&
|
|
|
+ // item.columnName === "beginPosition"
|
|
|
+ // ) {
|
|
|
+ // getSelectData(item.listqueryTemplateID, null, "beginPosition");
|
|
|
+ // beginPositionId.value = item.listqueryTemplateID;
|
|
|
+ // } else if (item.listqueryTemplateID && item.columnName === "endNode") {
|
|
|
+ // getSelectData(item.listqueryTemplateID, "", "endNode");
|
|
|
+ // } else if (
|
|
|
+ // item.listqueryTemplateID &&
|
|
|
+ // item.columnName === "endPosition"
|
|
|
+ // ) {
|
|
|
+ // getSelectData(item.listqueryTemplateID, null, "endPosition");
|
|
|
+ // endPositionId.value = item.listqueryTemplateID;
|
|
|
+ // }
|
|
|
});
|
|
|
tableCols.value.forEach((element) => {
|
|
|
element.label = element.columnLabel;
|
|
@@ -555,9 +510,35 @@ const generalDataReceptions = async (data) => {
|
|
|
}
|
|
|
} catch (error) {}
|
|
|
};
|
|
|
-sysServiceWarn();
|
|
|
-getQuery();
|
|
|
-getSelectDatas(route.query.listqueryTemplateID);
|
|
|
+//获取航司二字码
|
|
|
+const getIaCode = async () => {
|
|
|
+ const result = await htQuery(DATACONTENT_ID.sysServiceHsId);
|
|
|
+ iaCodeArr.value = result;
|
|
|
+};
|
|
|
+//获取机场
|
|
|
+const getAirpot = async () => {
|
|
|
+ const result = await htQuery(DATACONTENT_ID.sysServiceHzId);
|
|
|
+ tableOption.value = result;
|
|
|
+};
|
|
|
+//获取节点
|
|
|
+const getJdData = async () => {
|
|
|
+ const result = await htQuery(DATACONTENT_ID.sysServiceJdId);
|
|
|
+ tableOptionser.value = result;
|
|
|
+};
|
|
|
+//获取位置
|
|
|
+const getWzData = async () => {
|
|
|
+ const result = await htQuery(DATACONTENT_ID.sysServiceWzId);
|
|
|
+ tableOptionbegin.value = result;
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ sysServiceWarn();
|
|
|
+ getQuery();
|
|
|
+ getSelectDatas(route.query.listqueryTemplateID);
|
|
|
+ getIaCode();
|
|
|
+ getAirpot();
|
|
|
+ getJdData();
|
|
|
+ getWzData();
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|