From 0ec2f3ea1a371dd7008ad1f964a27b9f7fe388db Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Fri, 26 Dec 2025 17:27:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=BA=E6=99=AF=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/business/project/index.ts | 14 +- .../src/api/business/scenario/index.ts | 50 ++++ .../src/views/business/project/index.vue | 11 +- .../src/views/component/scenario/index.vue | 219 ++++++++++++++---- 4 files changed, 248 insertions(+), 46 deletions(-) create mode 100644 business-css/frontend/src/api/business/scenario/index.ts diff --git a/business-css/frontend/src/api/business/project/index.ts b/business-css/frontend/src/api/business/project/index.ts index be81232..08c1f34 100644 --- a/business-css/frontend/src/api/business/project/index.ts +++ b/business-css/frontend/src/api/business/project/index.ts @@ -15,7 +15,7 @@ export function searchProjectsLsit(queryParams:any){ //新增项目 export function addProjects(data:any){ return request({ - url:'/projects' , + url:'/projects/createAndReturn' , method: 'Post', data: data }); @@ -48,3 +48,15 @@ export function deleteBatchProjects (queryParams:any){ data: queryParams }); } + + + +export function topologyDevicesLsit(queryParams:any){ + return request({ + url: `/projects/search/${queryParams.id}/topology/devices` , + method: 'get', + params:queryParams + }); +} + + diff --git a/business-css/frontend/src/api/business/scenario/index.ts b/business-css/frontend/src/api/business/scenario/index.ts new file mode 100644 index 0000000..ceffd06 --- /dev/null +++ b/business-css/frontend/src/api/business/scenario/index.ts @@ -0,0 +1,50 @@ +import request from '@/utils/request'; + +//获取所有项目列表 +export function searchScenariosLsit(queryParams:any){ + return request({ + url: '/scenarios/by-project' , + method: 'get', + params:queryParams + }); +} + + + + +//新增项目 +export function addScenarios(data:any){ + return request({ + url:'/scenarios' , + method: 'Post', + data: data + }); +} + + +//更新项目信息 +export function updateScenarios(queryParams:any){ + return request({ + url:'/scenarios' , + method: 'PUT', + data: queryParams + }); +} + + +//单个删除项目 +export function deleteScenarios(queryParams:any){ + return request({ + url:'/scenarios/'+queryParams.id , + method: 'delete' + // params: queryParams + }); +} +//多选删除项目 +export function deleteBatchScenarios(queryParams:any){ + return request({ + url:'/scenarios', + method: 'delete', + data: queryParams + }); +} diff --git a/business-css/frontend/src/views/business/project/index.vue b/business-css/frontend/src/views/business/project/index.vue index af0168b..7f0291e 100644 --- a/business-css/frontend/src/views/business/project/index.vue +++ b/business-css/frontend/src/views/business/project/index.vue @@ -9,8 +9,7 @@ import { onMounted, ref, nextTick } from "vue"; import { ElForm, ElMessage, ElMessageBox } from "element-plus"; import { searchProjectsLsit,addProjects,updateProjects,deleteProjects,deleteBatchProjects} from "@/api/business/project"; import Page from '@/components/Pagination/page.vue' -import Scenario from '@/views/component/scenario/index.vue' - +import ScenarioModel from '@/views/component/scenario/index.vue' const isScenario = ref(false) //是否展示历史模拟场景 // 搜索框 const queryParams = ref({ @@ -100,9 +99,10 @@ function confirmClick(formEl: any) { }); } -//新建角色-取消按钮 +//取消按钮 function handleClose() { dialogVisible.value = false; + isScenario.value = false; if (infoForm.value != null) infoForm.value.resetFields(); } //新建项目 @@ -263,9 +263,8 @@ onMounted(() => { - + append-to-body width="1142px"> + diff --git a/business-css/frontend/src/views/component/scenario/index.vue b/business-css/frontend/src/views/component/scenario/index.vue index 00eed13..1773b04 100644 --- a/business-css/frontend/src/views/component/scenario/index.vue +++ b/business-css/frontend/src/views/component/scenario/index.vue @@ -7,9 +7,18 @@ export default { @@ -203,8 +248,8 @@ onMounted(() => { @selection-change="handleSelectionChange" :header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"> - - + + - + @@ -242,24 +289,39 @@ onMounted(() => { - - - - - - - - - - - - 取 消 - 确 定 - - + :modal="false" draggable :before-close="handleScenarioClose" title="'新增事故情景'" + append-to-body width="1000px"> +
+ + + + + +
+
+ + + + + + + + + + + + + + +
+
+ 下一步 +
+
@@ -345,6 +407,10 @@ onMounted(() => { .el-dialog .el-input{ --el-input-inner-height: 38px } +.el-dialog .el-select__wrapper{ + height: 40px +} + .scenario-search-box .el-button{ height: 36px !important; } @@ -352,4 +418,79 @@ onMounted(() => { height: 40px; } + +.scenario-setting-box{ + width: 900px; + height: 100px; + background: inherit; + background-color: rgba(255, 255, 255, 1); + border: none; + border-radius: 5px; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); + margin: 0 auto; + display: flex; + justify-content: center; + align-items: center; +} + + +.scenario-setting-box .el-step__icon.is-text{ + width: 30px; + height: 30px; + line-height: 30px; + background-color: #c9c9c9 ; + border-color: #c9c9c9 ; + color: #fff; + +} + +.scenario-setting-box .is-finish .el-step__icon.is-text{ + width: 30px; + height: 30px; + line-height: 30px; + background-color: #266fff ; + border-color: #266fff ; + color: #fff; +} + +.scenario-setting-box .is-process .el-step__icon.is-text{ + width: 30px; + height: 30px; + line-height: 30px; + background-color: #266fff ; + border-color: #266fff ; + color: #fff; +} +.scenario-setting-box .el-step__title{ + font-family: 'Arial Normal', 'Arial', sans-serif; + font-weight: 400; + font-style: normal; + font-size: 16px; + letter-spacing: normal; +} +.scenario-setting-box .el-step__title.is-finish{ + color: #266fff ; +} +.scenario-setting-box .el-step__title.is-process{ + color: #266fff ; +} +.scenario-setting-box .el-step__line{ + height: 1px !important; + background-color: #ebebeb !important; +} + +.scenario-setting-bottombox{ + width: 900px; + height: calc(100vh - 300px); + background: inherit; + background-color: rgba(255, 255, 255, 1); + border: none; + border-radius: 5px; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); + margin: 20px auto; + display: flex; + justify-content: center; + align-items: center; +} + \ No newline at end of file