Bläddra i källkod

feat:需求迭代

linchengzhe 2 månader sedan
förälder
incheckning
7a7e1cb687

+ 5 - 1
src/api/sceneLibrary.js

@@ -16,6 +16,8 @@ const deleteSceneEvaluationRule = basePart +'/ScoringRules/deleteSceneEvaluation
 const querybenchmarkList = basePart + '/sceneReference/querySceneReferenceLibList'; // 基准场景库列表
 
 const saveSceneReferenceById = basePart + '/sceneReference/saveSceneReferenceById'; // 基准场景编辑
+const queryCoverInfo = basePart + '/sceneReference/loadConvergePrefixStatus'; // 查询覆盖率前置
+const executeCoverStatus = basePart + '/sceneReference/handleConvergePrefix'; //
 
 const benchmarkSearchCreate = basePart + '/dict/createDictByType'; // 基准库筛选项创建
 
@@ -115,5 +117,7 @@ export default {
     queryRiskDetail,
     batchDeleteSceneReference,
     benchmarkSearchCreate,
-    benchmarkSearchDelete
+    benchmarkSearchDelete,
+    queryCoverInfo,
+    executeCoverStatus
 }

+ 56 - 0
src/views/sceneLibrary/benchmarkScenarioList.vue

@@ -228,6 +228,9 @@
       <template slot="searchBtn2">
         <el-button type="primary" @click="benchmarkEditShow=true">筛选编辑</el-button>
       </template>
+      <template slot="searchBtn2">
+        <el-button type="primary" @click="coverFindHandle">查询覆盖率-前置</el-button>
+      </template>
     </search-layout>
     <tableList
       ref="table"
@@ -393,6 +396,29 @@
         <el-button type="primary" @click="editUpdate">更新</el-button>
       </div>
     </el-dialog>
+
+    <!-- 覆盖率查询 -->
+    <el-dialog
+      title="覆盖率前置查询"
+      :visible.sync="coveRateShow"
+      width="820px"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+    <div style="margin-bottom: 20px;">前置覆盖率查询结果:{{ coverMap[coverRunStatus]}}</div>
+      <el-form
+s        ref="coverInfo"
+        label-width="130px"
+        style="display: flex; flex-wrap: wrap; justify-content: space-between;"
+      >
+        <el-form-item v-for="(item,idx) in coverInfo" :label="item.sceneBaseName || ''" :key="idx">
+          <el-input  :value="item.sceneNums || ''" :disabled="true"></el-input>
+        </el-form-item>
+      </el-form>
+      <div style="width: 100%; display: flex; justify-content: center">
+        <el-button :disabled="coverRunStatus=='20'" type="primary" @click="executeAgainHandle">重新执行</el-button>
+      </div>
+    </el-dialog>
     <benchmark-edit v-if="benchmarkEditShow" @closeHandle="editCloseHandle"></benchmark-edit>
   </div>
 </template>
@@ -407,6 +433,14 @@ export default {
   components: { searchLayout, tableList,benchmarkEdit },
   data() {
     return {
+      coverMap :{
+        '20':'执行中',
+        "30":'执行完成',
+        '10':'待执行'
+      },
+      coveRateShow:false, // 查询覆盖率显示
+      coverInfo:[], // 覆盖率查询数据
+      coverRunStatus:0, // 执行状态
       benchmarkEditShow:false,
       //搜索参数
       searchParams: {
@@ -576,6 +610,28 @@ export default {
   },
 
   methods: {
+    coverFindHandle(){
+      this.coverInfo = []
+      this.coveRateShow = true
+      this.$axios({
+        method: 'get',
+        url: this.$api.sceneLibrary.queryCoverInfo,
+      }).then(res=>{
+        this.coverRunStatus = res.info.statusCode
+        this.coverInfo = res.info.baseSceneKeysNumsVos || []
+      })
+    },
+    // 重新执行
+    executeAgainHandle(){
+      this.$axios({
+        method: 'post',
+        url: this.$api.sceneLibrary.executeCoverStatus,
+      }).then(res=>{
+        (res.message || '').indexOf('失败') ==-1? this.$message.success(res.message || '操作成功') : 
+        this.$message.error(res.message || '查询失败')
+        this.coveRateShow = false
+      })
+    },
     // 编辑弹窗更新
      editUpdate() {
       this.$axios({

+ 4 - 0
src/views/sceneLibrary/common.js

@@ -15,4 +15,8 @@ export  const ruleTypeOpts = [
     value: '1',
     label: '复杂度',
   },
+  {
+    value: '5',
+    label: '覆盖率-前置脚本',
+  },
 ]

+ 1 - 1
src/views/systemManagement/sceneLibraryManagement/benchmarkScenario.vue

@@ -220,7 +220,7 @@
         </el-input>
       </template>
       <template slot="searchBtn1">
-        <el-button type="primary" @click="doSearch">查询</el-button>
+        <el-button type="primary" @click="doSearch">查询1</el-button>
       </template>
       <template slot="searchBtn2">
         <el-button type="primary" @click="doReset">重置</el-button>

+ 4 - 4
vue.config.js

@@ -78,7 +78,7 @@ module.exports = {
         proxy: { // 配置跨域处理 可以设置多个
             '/simulation/oauth': {
                 // target: 'http://60.205.245.110:7001', // online-new
-                target: 'http://192.168.11.221:7001', // 国汽机房
+                target: 'http://82.156.222.130:7001', // 国汽机房
                 changeOrigin: true,
                 secure: false, // 如果是https接口,需要配置这个参数
                 pathRewrite: {
@@ -87,7 +87,7 @@ module.exports = {
             },
             '/simulation/resource/common': {
                 // target: 'http://60.205.245.110:8001', // online-new
-                target: 'http://192.168.11.221:8001', // 国汽机房
+                target: 'http://82.156.222.130:8001', // 国汽机房
                 changeOrigin: true,
                 secure: false, // 如果是https接口,需要配置这个参数
                 pathRewrite: {
@@ -96,7 +96,7 @@ module.exports = {
             },
             '/simulation/resource/server': {
                 // target: 'http://60.205.245.110:8005', // online-new
-                target: 'http://192.168.11.221:8005', // 国汽机房
+                target: 'http://82.156.222.130:8005', // 国汽机房
                 changeOrigin: true,
                 secure: false, // 如果是https接口,需要配置这个参数
                 pathRewrite: {
@@ -105,7 +105,7 @@ module.exports = {
             },
             '/simulation/resource/video': {
                 // target: 'http://60.205.245.110:8007', // online-new
-                target: 'http://192.168.11.221:8007', // 国汽机房
+                target: 'http://82.156.222.130:8007', // 国汽机房
                 changeOrigin: true,
                 secure: false, // 如果是https接口,需要配置这个参数
                 pathRewrite: {