+
失败
-
@@ -702,5 +754,37 @@ function confirmsClick(){
height: 40px;
}
-
+.adddevice_navigation_left{
+ width: 110px;
+ height: 32px;
+ line-height: 32px;
+ text-align: center;
+ cursor: pointer;
+ font-family: 'Arial Normal', 'Arial';
+ font-weight: 400;
+ font-style: normal;
+ font-size: 14px;
+ color: #363636;
+ background-image: url('@/assets/x6/navleft.png');
+}
+.adddevice_navigation_left:hover{
+ color: #266fff ;
+}
+.adddevice_navigation_activeleft{
+ background-image: url('@/assets/x6/navleft_active.png');
+ color: #fff !important;
+}
+.adddevice_navigation_right{
+ width: 110px;
+ height: 32px;
+ line-height: 32px;
+ text-align: center;
+ cursor: pointer;
+ font-family: 'Arial Normal', 'Arial';
+ font-weight: 400;
+ font-style: normal;
+ font-size: 14px;
+ color: #363636;
+ background-image: url('@/assets/x6/navright.png');
+}
\ No newline at end of file
diff --git a/business-css/frontend/src/views/component/scenario/condition.vue b/business-css/frontend/src/views/component/scenario/condition.vue
index a9a907d..c1c8094 100644
--- a/business-css/frontend/src/views/component/scenario/condition.vue
+++ b/business-css/frontend/src/views/component/scenario/condition.vue
@@ -313,7 +313,8 @@ function getDeviceInfo(e:any){ // 获取设备信息
diff --git a/business-css/frontend/src/views/component/scenario/index.vue b/business-css/frontend/src/views/component/scenario/index.vue
index 7ed2a46..4a46e4c 100644
--- a/business-css/frontend/src/views/component/scenario/index.vue
+++ b/business-css/frontend/src/views/component/scenario/index.vue
@@ -10,7 +10,7 @@ import { ElForm, ElMessage, ElMessageBox } from "element-plus";
import { searchScenariosLsit,addScenarios,updateScenarios,deleteScenarios,deleteBatchScenarios} from "@/api/business/scenario";
import { getActiveAlgorithms } from "@/api/business/scenario";
import ConditionModel from '@/views/component/scenario/condition.vue'
-import { simulationInit,simulationRun } from "@/api/business/project";
+import { simRun,simulationRun } from "@/api/business/project";
import Page from '@/components/Pagination/page.vue'
import { getDictItemById } from '@/api/dict';
import Createscenario from '@/views/component/scenario/createscenario.vue'
@@ -262,6 +262,7 @@ function closeCreatescenario(){
}
function confirmationAnalysis(row: any) {
+
ElMessageBox.confirm("确定对"+ row.name +"故情景分析进行模拟吗?", "确认模拟", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -272,43 +273,19 @@ function confirmationAnalysis(row: any) {
projectId: row.projectId,
scenarioId: row.scenarioId,
};
- simulationInit(params).then((res:any) => {
- if (res.code == '0') {
- let data = {
- data: res.data
- }
- simulationRun(row.projectId, row.scenarioId, data || {}).then((res:any) => {
- if(res.code == '0'){
- ElMessage({
- type: "success",
- message: "模拟计算成功",
- });
- gettableData();
- setTimeout(() => {
- resultClick(row)
- // window.open(webUrl + '/#/viewanalysis?projectId='+ row.projectId +'&scenarioId='+ row.scenarioId, '_blank');
- }, 1000);
-
- }else{
- ElMessage({
- type: "error",
- message: "模拟运行失败,请检查后端服务是否正常",
- });
- }{}
-
- }).catch((error) => {
- console.error('模拟运行失败:', error);
+ simRun(params).then((res:any) => {
+ if (res.code == '0') {
ElMessage({
- type: "error",
- message: "模拟运行失败,请检查后端服务是否正常",
- });
- })
- }else{
+ message: '模拟计算成功',
+ type: 'success',
+ })
+ gettableData();
+ }else{
ElMessage({
- type: "error",
- message: "模拟初始化失败",
- });
- }
+ message: '模拟计算失败',
+ type: 'error',
+ })
+ }
});
})
}