|
@@ -377,13 +377,13 @@ const endPositionId = ref<string | any>("");
|
|
|
const tableObj = ref({}); //增删改数据缓存
|
|
|
const delName = ref<string>("");
|
|
|
const tableForm = reactive({
|
|
|
- alarmSceneId: "",
|
|
|
- IATACode: "",
|
|
|
- departmentAirport: "",
|
|
|
- landingAirport: "",
|
|
|
- flightNo: "",
|
|
|
- startDate: "",
|
|
|
- endDate: "",
|
|
|
+ alarmSceneId: null,
|
|
|
+ IATACode: null,
|
|
|
+ departmentAirport: null,
|
|
|
+ landingAirport: null,
|
|
|
+ flightNo: null,
|
|
|
+ startDate: null,
|
|
|
+ endDate: null,
|
|
|
event: 2,
|
|
|
}); //报警预警场景
|
|
|
const tableForms = reactive<any>({
|
|
@@ -459,16 +459,16 @@ const addForm = () => {
|
|
|
const resetForm = () => {
|
|
|
flag.value = false;
|
|
|
tableForms.alarmStrategyID = null;
|
|
|
- tableForms.StrategyName = "";
|
|
|
- tableForms.calculationBasis = "";
|
|
|
- tableForms.warningDuration = "";
|
|
|
- tableForms.alarmDuration = "";
|
|
|
- tableForms.beginNode = "";
|
|
|
- tableForms.beginPosition = "";
|
|
|
- tableForms.endNode = "";
|
|
|
- tableForms.endPosition = "";
|
|
|
- tableForms.percentage = "";
|
|
|
- delName.value = "";
|
|
|
+ tableForms.StrategyName = null;
|
|
|
+ tableForms.calculationBasis = null;
|
|
|
+ tableForms.warningDuration = null;
|
|
|
+ tableForms.alarmDuration = null;
|
|
|
+ tableForms.beginNode = null;
|
|
|
+ tableForms.beginPosition = null;
|
|
|
+ tableForms.endNode = null;
|
|
|
+ tableForms.endPosition = null;
|
|
|
+ tableForms.percentage = null;
|
|
|
+ delName.value = null;
|
|
|
};
|
|
|
const delRemove = async () => {
|
|
|
// tableForms.event = 3;
|
|
@@ -478,14 +478,14 @@ const delRemove = async () => {
|
|
|
3
|
|
|
);
|
|
|
if (code == 0) {
|
|
|
- ElMessage.success(message);
|
|
|
+ ElMessage.success("保存成功");
|
|
|
resetTable();
|
|
|
getQuery();
|
|
|
resetForm();
|
|
|
flag.value = false;
|
|
|
tableObj.value = {};
|
|
|
} else {
|
|
|
- ElMessage.error(message);
|
|
|
+ ElMessage.error("操作失败");
|
|
|
tableObj.value = {};
|
|
|
resetForm();
|
|
|
}
|
|
@@ -527,7 +527,7 @@ const btnClick = (row, index, param) => {
|
|
|
delete tableForms.endPosition;
|
|
|
delete tableForms.percentage;
|
|
|
delete tableForms.beginPosition;
|
|
|
- delete tableForms.alarmSceneId;
|
|
|
+ // delete tableForms.alarmSceneId;
|
|
|
delete tableForms.event;
|
|
|
// tableForms.StrategyName = index.StrategyName;
|
|
|
// tableForms.calculationBasis = index.calculationBasis;
|
|
@@ -799,7 +799,7 @@ const getQuery = async () => {
|
|
|
};
|
|
|
//开始节点
|
|
|
const changeSelect = (value) => {
|
|
|
- console.log(value);
|
|
|
+ // console.log(value);
|
|
|
// tableOptionbegin.value = getSelectData(beginPositionId, value,'beginPosition');
|
|
|
// tableForms.beginPosition = "";
|
|
|
};
|
|
@@ -832,7 +832,7 @@ const submitForm = () => {
|
|
|
"alarmSceneId"
|
|
|
);
|
|
|
if (code == 0) {
|
|
|
- ElMessage.success(message);
|
|
|
+ ElMessage.success("保存成功");
|
|
|
resetTable();
|
|
|
getQuery();
|
|
|
resetForm();
|
|
@@ -841,7 +841,7 @@ const submitForm = () => {
|
|
|
} else {
|
|
|
tableObj.value = {};
|
|
|
resetForm();
|
|
|
- ElMessage.error(message);
|
|
|
+ ElMessage.error("操作失败");
|
|
|
}
|
|
|
} else {
|
|
|
return false;
|
|
@@ -895,19 +895,21 @@ const generalDataReception = async (data) => {
|
|
|
//编辑数据
|
|
|
const warningEditsForm: any = ref(null);
|
|
|
const preserForm = async () => {
|
|
|
+ const arr = JSON.parse(JSON.stringify(tableForm));
|
|
|
warningEditsForm.value.validate(async (valid: any) => {
|
|
|
if (valid) {
|
|
|
const { code, message } = await dataToChange(
|
|
|
DATACONTENT_ID.sysServiceCjIds,
|
|
|
- tableForm,
|
|
|
+ arr,
|
|
|
2,
|
|
|
"alarmSceneId"
|
|
|
);
|
|
|
if (code == 0) {
|
|
|
- ElMessage.success(message);
|
|
|
+ ElMessage.success("保存成功");
|
|
|
sysServiceWarn();
|
|
|
+ // router.go(0);
|
|
|
} else {
|
|
|
- ElMessage.error(message);
|
|
|
+ ElMessage.error("操作失败");
|
|
|
}
|
|
|
} else {
|
|
|
return false;
|