|
@@ -33,8 +33,8 @@ const flowParams = {
|
|
|
};
|
|
|
|
|
|
const answerLoading = ref(false);
|
|
|
-
|
|
|
const textDataSources = ref(null);
|
|
|
+const warningActive = ref(0);
|
|
|
|
|
|
// 进出水数据
|
|
|
const jsTableData = ref([]);
|
|
@@ -91,7 +91,8 @@ const handleOpenContent = async ({ id, category, reason:title }) => {
|
|
|
|
|
|
const reportList = [];
|
|
|
const alertList = [];
|
|
|
-
|
|
|
+ let simulateObj = null;
|
|
|
+
|
|
|
answer.map(item => {
|
|
|
const answerObjItem = JSON.parse(item);
|
|
|
switch(answerObjItem.biz) {
|
|
@@ -99,10 +100,21 @@ const handleOpenContent = async ({ id, category, reason:title }) => {
|
|
|
reportList.push(answerObjItem.message);
|
|
|
break
|
|
|
case "DECISION_ALERT":
|
|
|
- alertList.push(JSON.parse(item));
|
|
|
+ alertList.push(answerObjItem);
|
|
|
break
|
|
|
case "DECISION_SIMULATE":
|
|
|
- // console.log("实际未返回");
|
|
|
+ console.log( "DECISION_SIMULATE", answerObjItem.message );
|
|
|
+ if (warningActive.value === 1) return;
|
|
|
+ const { off, on, pred } = JSON.parse(answerObjItem.message);
|
|
|
+ console.log( JSON.parse(answerObjItem.message) );
|
|
|
+ simulateObj = {
|
|
|
+ biz: 'DECISION_SIMULATE',
|
|
|
+ off,
|
|
|
+ on,
|
|
|
+ pred,
|
|
|
+ isDisable: false
|
|
|
+ }
|
|
|
+ modalData.value = simulateObj;
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -129,6 +141,10 @@ const handleOpenContent = async ({ id, category, reason:title }) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ if (simulateObj) {
|
|
|
+ answerResult.value.push(simulateObj);
|
|
|
+ }
|
|
|
+
|
|
|
basic.title = title;
|
|
|
textDataSources.value = formatToData(basic, '报警值');
|
|
|
|
|
@@ -139,6 +155,7 @@ const handleOpenContent = async ({ id, category, reason:title }) => {
|
|
|
|
|
|
const onChangeTabs = warningStatus => {
|
|
|
resetConfiguration();
|
|
|
+ warningActive.value = warningStatus;
|
|
|
onRestore({ warningStatus });
|
|
|
}
|
|
|
|