Przeglądaj źródła

feat:评价模块联调

linchengzhe 1 rok temu
rodzic
commit
9c39bfdb3b

+ 24 - 1
src/api/sceneLibrary.js

@@ -8,6 +8,14 @@ const saveScoringRules = basePart + '/ScoringRules/saveScoringRules'; // 保存
 const fxScoringRules = basePart + '/ScoringRules/fxScoringRules'; // 分享评分规则
 const deleteScoringRules = basePart + '/ScoringRules/deleteScoringRules'; // 删除评分规则
 const queryCsbById = basePart + '/ScoringRules/queryCsbById'; // 查询该规则是否有关联任务
+const queryScoringRulesInfo = basePart +'/ScoringRules/saveSceneEvaluationRule';  // 场景评价编辑
+const getScriptListByType = basePart +'/ScoringRules/queryEvaluationScript'; // 脚本列表 【复杂度,危险度等】
+
+const deleteSceneEvaluationRule = basePart +'/ScoringRules/deleteSceneEvaluationRule'; // 删除场景评价规则
+
+const querybenchmarkList = basePart + '/sceneReference/querySceneReferenceLibList'; // 基准场景库列表
+
+const saveSceneReferenceById = basePart + '/sceneReference/saveSceneReferenceById'; // 基准场景编辑
 
 const queryStandardsRegulationsList = basePart + '/StandardsRegulations/queryStandardsRegulationsList'; // 标准法规场景列表
 const saveStandardsRegulations = basePart + '/StandardsRegulations/saveStandardsRegulations'; // 新增标准法规仿场景
@@ -44,6 +52,12 @@ const saveSceneGeneralExample = basePart + '/SceneGeneralTemplate/saveSceneGener
 const queryGeneralTemplateByFh = basePart + '/SceneGeneralTemplate/queryGeneralTemplateByFh'; // 泛化过的详情
 
 
+const queryComplexityDetail = basePart + '/ScoringRules/querySceneEvaluationComplexityDetail'; // 获取复杂度详情
+
+const queryRiskDetail =  basePart + '/ScoringRules/querySceneEvaluationRiskDetail';
+
+const batchDeleteSceneReference = basePart + '/sceneReference/batchDeleteSceneReference'; // 批量删除基准库场景
+
 export default {
     queryScoringRulesList,
     querySceneScoringRulesList,
@@ -85,5 +99,14 @@ export default {
     querySceneGeneralTemplateById,
     saveSceneGeneralTemplate,
     saveSceneGeneralExample,
-    queryGeneralTemplateByFh
+    queryGeneralTemplateByFh,
+
+    queryScoringRulesInfo,
+    getScriptListByType,
+    querybenchmarkList,
+    deleteSceneEvaluationRule,
+    saveSceneReferenceById,
+    queryComplexityDetail,
+    queryRiskDetail,
+    batchDeleteSceneReference
 }

+ 1 - 1
src/axios/filter.js

@@ -46,7 +46,7 @@ Vue.use(VueAxios, axios);
 axios.defaults.baseURL = ''; //项目的的基础url
 axios.defaults.headers.common['Authorization'] = ""; //请求token信息配置
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; //请求type设置
-axios.defaults.timeout = 1000 * 60; //在超时前,所有请求都会等待相应秒数
+axios.defaults.timeout = 1000 * 1000; //在超时前,所有请求都会等待相应秒数
 axios.defaults.withCredentials = true;
 let isInvalid1 = false //用于控制登录信息过期后弹窗时间的截流,截流时间为5s
 let isInvalid2 = false

+ 10 - 0
src/store/index.js

@@ -33,6 +33,8 @@ export default new Vuex.Store({
     scenePacketDistributionDetailTabName: "", // 场景包分配详情
     editAccountTabName: "", // 编辑账户详情
     vehicleModelDetailTabName: "", // 车辆设置详情
+    evaluationInfo:{}, // 场景评价编辑信息
+    sceneId:"", // 场景id
   },
   mutations: {
     getUserId(state, data) {
@@ -54,8 +56,16 @@ export default new Vuex.Store({
       state.taskInfoTabname = data
     },
     getTabname(state, name, data) {
+      console.log('zzz',name,data)
       state[name] = data
     },
+    getEvaluationInfo(state,data){
+      state.evaluationInfo = data
+    },
+    getSceneId(state,data){
+      state.sceneId = data
+    }
+    
   },
   actions: {},
   modules: {},

+ 6 - 1
src/views/multimodeSimulation/simulationEdit.vue

@@ -95,7 +95,7 @@
     >
       <el-table-column label="操作" slot="cgInfos" align="center" width="180">
         <template v-slot="scope">
-          <span v-if="!isEdit" @click="" class="elIcon"> 评价结果 </span>
+          <span v-if="!isEdit" @click="toEvaluate" class="elIcon"> 评价结果 </span>
           <span v-if="isEdit" @click="" class="elIcon"> 编辑 </span>
           <span v-if="isEdit" @click="" class="elIcon"> 删除 </span>
         </template>
@@ -184,6 +184,11 @@ export default {
   methods: {
     copyConfig() {},
     addConfig() {},
+    toEvaluate(){
+      this.$router.push({
+        path: '/test3',
+      })
+    }
   },
 }
 </script>

+ 302 - 166
src/views/sceneLibrary/benchmarkScenarioList.vue

@@ -4,7 +4,7 @@
       <template slot="searchItem1">
         <span class="label">场景名称</span>
         <el-input
-          v-model="searchParams.sceneId"
+          v-model="searchParams.sceneName"
           size="small"
           clearable
           placeholder="请输入"
@@ -13,129 +13,212 @@
         >
         </el-input>
       </template>
-      <template slot="searchItem2">
+      <template slot="searchItem1">
         <span class="label">主车动作</span>
         <el-select
-          v-model="searchParams.fileName"
-          multiple
+          v-model="searchParams.mainBehavior[0][1]"
           size="small"
           clearable
         >
           <el-option
-            v-for="item in fileNameList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
+            v-for="item in ['汇入']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem2">
+        <span class="label">他车动作</span>
+        <el-select
+          v-model="searchParams.otherBehavior[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['直行']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem2">
+        <span class="label">天气</span>
+        <el-select v-model="searchParams.weather[0][1]" size="small" clearable>
+          <el-option
+            v-for="item in ['晴']"
+            :label="item"
+            :value="item"
+            :key="item"
           ></el-option>
         </el-select>
       </template>
-      <!-- 复杂度 -->
       <template slot="searchItem3">
+        <span class="label">道路类型</span>
+        <el-select v-model="searchParams.roadType[0][1]" size="small" clearable>
+          <el-option
+            v-for="item in ['高速']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem3">
+        <span class="label">道路几何-平面</span>
+        <el-select
+          v-model="searchParams.roadGeometryPlane[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['直道']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem4">
+        <span class="label">道路几何-纵断面</span>
+        <el-select
+          v-model="searchParams.roadGeometryVertical[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['上坡']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem4">
+        <span class="label">智能驾驶</span>
+        <el-select
+          v-model="searchParams.autoDriveFunction[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['ACC', 'AEB']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem5">
+        <span class="label">运行区域</span>
+        <el-select
+          v-model="searchParams.operationArea[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['主路']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <!-- 复杂度 -->
+      <template slot="searchItem5">
         <span class="label">复杂度</span>
         <el-input
-          v-model="searchParams.a"
+          v-model="searchParams.minComplexity"
           size="small"
           clearable
           placeholder="请输入"
           maxlength="60"
-          @keyup.enter.native="doSearch"
           style="width: 100px"
         >
         </el-input>
         <span class="dateSeparator">至</span>
         <el-input
-          v-model="searchParams.b"
+          v-model="searchParams.maxComplexity"
           size="small"
           clearable
           placeholder="请输入"
           maxlength="60"
-          @keyup.enter.native="doSearch"
           style="width: 100px"
         >
         </el-input>
       </template>
       <!-- 危险度 -->
-      <template slot="searchItem3">
+      <template slot="searchItem6">
         <span class="label">危险度</span>
         <el-input
-          v-model="searchParams.a"
+          v-model="searchParams.minRisk"
           size="small"
           clearable
           placeholder="请输入"
           maxlength="60"
-          @keyup.enter.native="doSearch"
           style="width: 100px"
         >
         </el-input>
         <span class="dateSeparator">至</span>
         <el-input
-          v-model="searchParams.b"
+          v-model="searchParams.maxRisk"
           size="small"
           clearable
           placeholder="请输入"
           maxlength="60"
-          @keyup.enter.native="doSearch"
           style="width: 100px"
         >
         </el-input>
       </template>
-      <template slot="searchItem5">
+      <template slot="searchItem6">
         <span class="label">复杂度等级</span>
         <el-select
-          v-model="searchParams.scenarioRoadType"
-          multiple
+          v-model="searchParams.complexityLevel"
           size="small"
           clearable
         >
           <el-option
-            v-for="item in scenarioRoadTypeList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
+            v-for="item in ['S', 'AA', 'A', 'B', 'C']"
+            :label="item"
+            :value="item"
+            :key="item"
           ></el-option>
         </el-select>
       </template>
-      <template slot="searchItem5">
+      <template slot="searchItem7">
         <span class="label">危险度等级</span>
-        <el-select
-          v-model="searchParams.scenarioRoadType"
-          multiple
-          size="small"
-          clearable
-        >
+        <el-select v-model="searchParams.riskLevel" size="small" clearable>
           <el-option
-            v-for="item in scenarioRoadTypeList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
+            v-for="item in ['S', 'AA', 'A', 'B', 'C']"
+            :label="item"
+            :value="item"
+            :key="item"
           ></el-option>
         </el-select>
       </template>
-      <!-- <template slot="searchItem3">
-                <span class="label">天气</span>
-                <el-select
-                    v-model="searchParams.scenarioWeather"
-                    multiple
-                    size="small"
-                    clearable
-                >
-                    <el-option
-                        v-for="item in scenarioWeatherList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template> -->
-      <!-- <template slot="searchItem4">
-                <span class="label">场景发生时刻</span>
-                <el-time-picker
-                    v-model="searchParams.scenarioTime"
-                    value-format="HH:mm:ss"
-                    placeholder="请选择"
-                >
-                </el-time-picker>
-            </template> -->
+      <template slot="searchItem7">
+        <span class="label">标签</span>
+        <el-input
+          v-model="searchParams.label"
+          size="small"
+          clearable
+          placeholder="请输入"
+          maxlength="60"
+        >
+        </el-input>
+      </template>
+      <template slot="searchItem8">
+        <span class="label">场景描述</span>
+        <el-input
+          v-model="searchParams.sceneDescription"
+          size="small"
+          clearable
+          placeholder="请输入"
+          maxlength="60"
+        >
+        </el-input>
+      </template>
       <template slot="searchBtn1">
         <el-button type="primary" @click="doSearch">查询</el-button>
       </template>
@@ -161,8 +244,8 @@
       >
         <template v-slot="scope">
           <span @click="viewRow(scope.row)" class="elIcon"> 查看 </span>
-          <span @click="editHandle()" class="elIcon"> 编辑 </span>
-          <span @click="jumpScene()" class="elIcon"> 场景评价 </span>
+          <span @click="editHandle(scope.row)" class="elIcon"> 编辑 </span>
+          <span @click="jumpScene(scope.row)" class="elIcon"> 场景评价 </span>
         </template>
       </el-table-column>
     </tableList>
@@ -192,10 +275,10 @@
       width="690px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
-      :before-close="diaClose"
+      :destroy-on-close="true"
     >
       <div class="videoBox">
-        <video autoplay :src="videoSrc" controls></video>
+        <video :src="videoSrc" controls></video>
       </div>
     </el-dialog>
     <!-- 编辑表格 -->
@@ -205,7 +288,6 @@
       width="780px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
-      :before-close="diaClose"
     >
       <el-form
         ref="editInfo"
@@ -220,36 +302,92 @@
           <el-input v-model="editInfo.sceneDescription"></el-input>
         </el-form-item>
         <el-form-item label="主车动作">
-          <el-select v-model="editInfo.mainBehavior"></el-select>
+          <el-select v-model="editInfo.mainBehavior">
+            <el-option
+              v-for="item in ['汇入']"
+              :label="item"
+              :value="item"
+              :key="item"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="他车动作">
-          <el-select v-model="editInfo.otherBehavior"></el-select>
+          <el-select v-model="editInfo.otherBehavior">
+            <el-option
+              v-for="item in ['直行']"
+              :label="item"
+              :value="item"
+              :key="item"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="天气">
-          <el-select v-model="editInfo.weather"></el-select>
+          <el-select v-model="editInfo.weather">
+            <el-option
+              v-for="item in ['晴']"
+              :label="item"
+              :value="item"
+              :key="item"
+            ></el-option
+          ></el-select>
         </el-form-item>
         <el-form-item label="道路类型">
-          <el-select v-model="editInfo.roadType"></el-select>
+          <el-select v-model="editInfo.roadType">
+            <el-option
+              v-for="item in ['高速']"
+              :label="item"
+              :value="item"
+              :key="item"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="道路几何-平面">
-          <el-select v-model="editInfo.roadGeometryPlane"></el-select>
+          <el-select v-model="editInfo.roadGeometryPlane">
+            <el-option
+              v-for="item in ['直道']"
+              :label="item"
+              :value="item"
+              :key="item"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="道路几何-纵断面">
-          <el-select v-model="editInfo.roadGeometryVertical"></el-select>
+          <el-select v-model="editInfo.roadGeometryVertical">
+            <el-option
+              v-for="item in ['上坡']"
+              :label="item"
+              :value="item"
+              :key="item"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="自动驾驶功能">
-          <el-select v-model="editInfo.autoDriveFunction"></el-select>
+          <el-select v-model="editInfo.autoDriveFunction">
+            <el-option
+              v-for="item in ['ACC', 'AEB']"
+              :label="item"
+              :value="item"
+              :key="item"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="运行区域">
-          <el-select v-model="editInfo.operationArea"></el-select>
+          <el-select v-model="editInfo.operationArea">
+            <el-option
+              v-for="item in ['主路']"
+              :label="item"
+              :value="item"
+              :key="item"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="标签">
-          <el-select v-model="editInfo.label"></el-select>
+          <el-input v-model="editInfo.label"></el-input>
         </el-form-item>
       </el-form>
-      <div style="width: 100%;display: flex;justify-content: center">
-        <el-button @click="editVisible=false">取消</el-button>
-        <el-button type="primary" @click="onSubmit">立即创建</el-button>
+      <div style="width: 100%; display: flex; justify-content: center">
+        <el-button @click="editVisible = false">取消</el-button>
+        <el-button type="primary" @click="editUpdate">更新</el-button>
       </div>
     </el-dialog>
   </div>
@@ -264,16 +402,26 @@ export default {
   components: { searchLayout, tableList },
   data() {
     return {
-      activeName: '2',
+      //搜索参数
       searchParams: {
-        //搜索参数
-        sceneId: '', // 场景编号
-        fileName: [], // 功能模块
-        scenarioRoadType: [], // 道路类型
-        scenarioResume: '', // 场景简述
+        sceneName: '', // 场景名称
         share: '0',
-        // scenarioWeather: [], // 天气
-        // scenarioTime: "", // 场景发生时刻
+        mainBehavior: [['mainBehavior', '']], // 主车动作
+        otherBehavior: [['otherBehavior', '']],
+        weather: [['weather', '']],
+        roadType: [['roadType', '']],
+        roadGeometryPlane: [['roadGeometryPlane', '']],
+        roadGeometryVertical: [['roadGeometryVertical', '']],
+        autoDriveFunction: [['autoDriveFunction', '']],
+        operationArea: [['operationArea', '']],
+        minComplexity: '',
+        maxComplexity: '',
+        minRisk: '',
+        maxRisk: '',
+        complexityLevel: '',
+        riskLevel: '',
+        sceneDescription: '',
+        label: '',
       },
       //  编辑信息
       editVisible: false,
@@ -291,7 +439,12 @@ export default {
         roadGeometryVertical: '', // 道路几何-纵断面
         operationArea: '', // 运行区域
       },
-      fileNameList: [],
+      fileNameList: [
+        {
+          label: '汇入',
+          value: '',
+        },
+      ],
       scenarioRoadTypeList: [],
       // scenarioWeatherList: [],
       props: {
@@ -378,41 +531,9 @@ export default {
       },
       getDataWay: {
         //加载表格数据
-        dataType: 'data',
+        dataType: 'url',
         type: 'post',
-        // firstRequest: false,
-        data: [
-          {
-            currentPage: 1,
-            pageSize: 10,
-            referenceId: 'd9b47f77cb8d4b13940dd74eef1c0d59',
-            referenceName: 'mountain_frontcar',
-            mainBehavior: '汇入',
-            otherBehavior: '直行',
-            weather: '晴',
-            sceneName: '20240126',
-            roadGeometryPlane: '直道',
-            roadGeometryVertical: '上坡',
-            autoDriveFunction: 'ACC',
-            lable: '标签',
-            referenceDescription: '场景描述',
-            complexity: 1,
-            risk: 1,
-            complexityLevel: 11,
-            riskLevel: 11,
-            videoAddress:
-              '基准场景库/20221125/1669366123893/Scenarios/mountain/simulation.mp4',
-            osgbAddress: '基准场景库/20221125/1669366123893/OSGB/0518.osgb',
-            xodrAddress: '基准场景库/20221125/1669366123893/XODR/0518.xodr',
-            xoscAddress:
-              '基准场景库/20221125/1669366123893/Scenarios/mountain/mountain_frontcar.xml',
-            jsonAddress:
-              '基准场景库/20221125/1669366123893/Scenarios/mountain/mountain_frontcar.json',
-            videoPreview: null,
-            label: null,
-            maxTime: '20',
-          },
-        ],
+        data: this.$api.sceneLibrary.querybenchmarkList,
         param: {
           share: '0',
         },
@@ -434,9 +555,43 @@ export default {
   },
 
   methods: {
+    // 编辑弹窗更新
+     editUpdate() {
+      this.$axios({
+        method: 'post',
+        url: this.$api.sceneLibrary.saveSceneReferenceById,
+        data: {...this.editInfo},
+      }).then(res=>{
+        if(res.code ==200){
+          this.editVisible = false
+          this.$message.success("更新成功");
+        }else{
+          this.$message.error(res.message || "更新失败");
+        }
+      })
+    },
+    // 搜索查询
     doSearch() {
-      this.searchParams.share = this.activeName === '1' ? '1' : '0'
-      this.refreshList(this.searchParams)
+      this.searchParams.share = '0'
+      const specialParams = [
+        'mainBehavior',
+        'otherBehavior',
+        'weather',
+        'roadType',
+        'roadGeometryPlane',
+        'roadGeometryVertical',
+        'autoDriveFunction',
+        'operationArea',
+      ]
+      const obj = JSON.parse(JSON.stringify(this.searchParams))
+      Object.keys(obj).forEach((item) => {
+        if(specialParams.includes(item)){
+          if(!obj[item][0][1]){
+            obj[item] = []
+          }
+        }
+      })
+      this.refreshList(obj)
     },
     //刷新table
     refreshList(param) {
@@ -446,13 +601,24 @@ export default {
     },
     doReset() {
       this.searchParams = {
-        sceneId: '',
-        fileName: [],
-        scenarioRoadType: [],
-        scenarioResume: '',
-        share: this.activeName === '1' ? '1' : '0',
-        // scenarioWeather: [],
-        // scenarioTime: "",
+        sceneName: '', // 场景名称
+        share: '0',
+        mainBehavior: [['mainBehavior', '']], // 主车动作
+        otherBehavior: [['otherBehavior', '']],
+        weather: [['weather', '']],
+        roadType: [['roadType', '']],
+        roadGeometryPlane: [['roadGeometryPlane', '']],
+        roadGeometryVertical: [['roadGeometryVertical', '']],
+        autoDriveFunction: [['autoDriveFunction', '']],
+        operationArea: [['operationArea', '']],
+        minComplexity: '',
+        maxComplexity: '',
+        minRisk: '',
+        maxRisk: '',
+        complexityLevel: '',
+        riskLevel: '',
+        sceneDescription: '',
+        label: '',
       }
       this.doSearch()
     },
@@ -462,54 +628,24 @@ export default {
     },
     viewRow(row) {
       this.dialogVisible = true
-      //   this.generalizationId = row.id
-      //   this.generalizationDiaTitle = '泛化模板- ' + (row.sceneId || '')
-      //   this.generalizationVisible = true
+      this.videoSrc = 'https://media.w3.org/2010/05/sintel/trailer.mp4'
     },
     // 编辑
-    editHandle() {
+    editHandle(e) {
+      this.editInfo = JSON.parse(JSON.stringify(e))
       this.editVisible = true
     },
     // 跳转场景评价
-    jumpScene(){
-        this.$router.push({
+    jumpScene(row) {
+      this.$store.commit("getSceneId",row.sceneId);
+      this.$router.push({
         path: '/sceneEvaluation',
-        // query: this.activeName == '3' ? { isScore: true } : {}, // 评分规则新增路由跳转标识
       })
     },
-    getFileNameList() {
-      this.$axios({
-        method: 'post',
-        url: this.$api.sceneLibrary.queryType,
-        data: {},
-      }).then((res) => {
-        if (res.code == 200 && res.info) {
-          let arr = []
-          res.info.forEach((item, i) => {
-            arr[i] = {
-              code: item,
-              caption: item,
-            }
-          })
-          this.fileNameList = arr
-        } else {
-          this.$message.error(res.message || '获取功能模块列表失败')
-        }
-      })
-    },
-    // 泛化-取消
-    generalizationCancel() {
-      this.generalizationVisible = false
-    },
   },
 
   async mounted() {
-    await this.$dicsListsInit({
-      // scenarioWeatherList: "scenarioWeather",
-      scenarioRoadTypeList: 'scenarioRoadType',
-    })
 
-    this.getFileNameList()
   },
 }
 </script>

+ 5 - 5
src/views/sceneLibrary/common.js

@@ -1,18 +1,18 @@
 export  const ruleTypeOpts = [
   {
-    value: '1',
+    value: '2',
     label: '危险度',
   },
   {
-    value: '2',
+    value: '3',
     label: '覆盖率',
   },
   {
-    value: '3',
+    value: '4',
     label: '暴露率',
   },
   {
-    value: '4',
+    value: '1',
     label: '复杂度',
   },
-]
+]

+ 0 - 107
src/views/sceneLibrary/generalizationScenarioList.vue

@@ -27,113 +27,6 @@
                     @keyup.enter.native="doSearch">
                 </el-input>
             </template>
-                         <!-- 复杂度 -->
-      <template slot="searchItem6">
-        <span class="label">复杂度</span>
-        <el-input
-          v-model="searchParams.a"
-          size="small"
-          clearable
-          placeholder="请输入"
-          maxlength="60"
-          @keyup.enter.native="doSearch"
-          style="width: 100px"
-        >
-        </el-input>
-        <span class="dateSeparator">至</span>
-        <el-input
-          v-model="searchParams.b"
-          size="small"
-          clearable
-          placeholder="请输入"
-          maxlength="60"
-          @keyup.enter.native="doSearch"
-          style="width: 100px"
-        >
-        </el-input>
-      </template>
-      <!-- 危险度 -->
-      <template slot="searchItem6">
-        <span class="label">危险度</span>
-        <el-input
-          v-model="searchParams.a"
-          size="small"
-          clearable
-          placeholder="请输入"
-          maxlength="60"
-          @keyup.enter.native="doSearch"
-          style="width: 100px"
-        >
-        </el-input>
-        <span class="dateSeparator">至</span>
-        <el-input
-          v-model="searchParams.b"
-          size="small"
-          clearable
-          placeholder="请输入"
-          maxlength="60"
-          @keyup.enter.native="doSearch"
-          style="width: 100px"
-        >
-        </el-input>
-      </template>
-      <template slot="searchItem8">
-        <span class="label">复杂度等级</span>
-        <el-select
-          v-model="searchParams.scenarioRoadType"
-          multiple
-          size="small"
-          clearable
-        >
-          <el-option
-            v-for="item in scenarioRoadTypeList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
-          ></el-option>
-        </el-select>
-      </template>
-      <template slot="searchItem8">
-        <span class="label">危险度等级</span>
-        <el-select
-          v-model="searchParams.scenarioRoadType"
-          multiple
-          size="small"
-          clearable
-        >
-          <el-option
-            v-for="item in scenarioRoadTypeList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
-          ></el-option>
-        </el-select>
-      </template>
-            <!-- <template slot="searchItem3">
-                <span class="label">天气</span>
-                <el-select
-                    v-model="searchParams.scenarioWeather"
-                    multiple
-                    size="small"
-                    clearable
-                >
-                    <el-option
-                        v-for="item in scenarioWeatherList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template> -->
-            <!-- <template slot="searchItem4">
-                <span class="label">场景发生时刻</span>
-                <el-time-picker
-                    v-model="searchParams.scenarioTime"
-                    value-format="HH:mm:ss"
-                    placeholder="请选择"
-                >
-                </el-time-picker>
-            </template> -->
             <template slot="searchBtn1">
                 <el-button type="primary" @click="doSearch">查询</el-button>
             </template>

+ 107 - 45
src/views/sceneLibrary/gradingRuleDetail.vue

@@ -3,6 +3,7 @@
     <el-form ref="form" :model="form" :rules="rules" label-width="108px">
       <el-form-item label="规则名称:" prop="ruleName">
         <el-input
+          :disabled="ruleTypeDisabled"
           placeholder="请输入"
           maxlength="50"
           v-autoTrim="{ obj: form, key: 'ruleName' }"
@@ -22,18 +23,6 @@
       </el-form-item>
 
       <el-form-item label="规则详情:" prop="ruleDetails" v-if="!isScore">
-        <!-- <el-input
-                    v-autoTrim="{
-                        obj: form,
-                        key: 'ruleDetails',
-                    }"
-                    v-model="form.ruleDetails"
-                    type="textarea"
-                    placeholder="请输入"
-                    :autosize="{ minRows: 8, maxRows: 8 }"
-                    maxlength="10000"
-                    show-word-limit
-                ></el-input> -->
         <editor
           :content="content"
           ref="editor"
@@ -42,6 +31,7 @@
       </el-form-item>
       <el-form-item v-else label="规则类型:" prop="ruleType">
         <el-select
+          :disabled="ruleTypeDisabled"
           v-model="form.ruleType"
           size="small"
           clearable
@@ -55,17 +45,34 @@
           ></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item
+        v-if="isScore && form.rulesId"
+        label="脚本名称:"
+        prop="scriptName"
+      >
+        <el-input
+          style="width: 400px"
+          disabled
+          placeholder=""
+          v-model="form.scriptName"
+        >
+        </el-input>
+      </el-form-item>
+
       <!-- 文件上传 -->
       <el-form-item label="文件上传" v-if="isScore">
-      <el-upload
-        class="upload-demo"
-        action=""
-        :file-list="fileList"
-        list-type="text">
-        <el-button size="small" type="primary">点击上传</el-button>
-      </el-upload>
-    </el-form-item>
-
+        <el-upload
+          :multiple="false"
+          action=""
+          class="upload-demo"
+          list-type="card"
+          :file-list="fileList"
+          :http-request="uploadHandle"
+          :on-remove="fileRemove"
+        >
+          <el-button size="small" type="primary">点击上传</el-button>
+        </el-upload>
+      </el-form-item>
 
       <div class="btns">
         <!-- 公有列表进,另存为+取消 另存为为新增一条数据 新增数据均为私有 1 -->
@@ -92,6 +99,7 @@
 <script>
 import editor from './components/editor'
 import { ruleTypeOpts } from './common'
+import { del } from 'vue'
 
 export default {
   name: 'gradingRuleDetail', // 评分规则
@@ -99,6 +107,7 @@ export default {
   data() {
     return {
       share: '-1', //控制显示按钮
+      scriptUpdate: false, // 脚本是否更新
       form: {
         rulesId: '',
         ruleName: '',
@@ -106,8 +115,10 @@ export default {
         ruleDescription: '',
         ruleDetails: '',
         ruleType: '',
+        scriptName: '',
       },
-      fileList:[], // 文件上传列表
+      ruleTypeDisabled: false,
+      fileList: [], // 文件上传列表
       content: '',
       rules: {
         ruleName: [{ required: true, message: '请输入', trigger: 'blur' }],
@@ -124,14 +135,24 @@ export default {
   computed: {},
 
   methods: {
+    fileRemove() {
+      this.fileList = []
+    },
+    uploadHandle(f) {
+      this.fileList = [f.file]
+      this.scriptUpdate = true
+    },
     save(isAdd) {
-      let ruleDetails = this.$refs.editor.editor.getText().trim()
-      this.form.ruleDetails = ruleDetails
+      let ruleDetails = null
 
+      if (!this.isScore) {
+        ruleDetails = this.$refs.editor.editor.getText().trim()
+        this.form.ruleDetails = ruleDetails
+      }
       // 调用save时,应写成save(),给不给参数均可,不写小括号的话,isAdd会是事件源,则为true
       this.$refs.form.validate((valid) => {
         if (valid) {
-          if (ruleDetails && ruleDetails.length > 1000000) {
+          if (!this.isScore && ruleDetails && ruleDetails.length > 1000000) {
             this.$message.error('规则详情长度不得超过100万!')
             return
           }
@@ -181,23 +202,52 @@ export default {
       })
     },
     saveFn() {
-      this.$axios({
-        method: 'post',
-        url: this.$api.sceneLibrary.saveScoringRules,
-        data: {
-          ...this.form,
-        },
-      }).then((res) => {
-        if (res.code === 200) {
-          this.$message.success('保存成功')
-          this.cancel()
-        } else {
-          this.$message.error(res.message || '保存失败')
-        }
-      })
-      // .catch((error) => {
-      //     this.$message.error(error || "保存失败!");
-      // });
+      if (this.isScore) {
+        let formData = new FormData()
+        let source = { ...this.form }
+        source['ruleId'] = source.rulesId
+        delete source.rulesId
+        const json = JSON.stringify({
+          ...source,
+          uploadNewFile: this.scriptUpdate,
+        })
+        const blob = new Blob([json], {
+          type: 'application/json',
+        })
+        formData.append('content', blob)
+        this.scriptUpdate && formData.append('file', this.fileList[0])
+        this.$axios({
+          method: 'post',
+          url: this.$api.sceneLibrary.queryScoringRulesInfo,
+          data: formData,
+          withCredentials: true,
+          headers: {
+            'Content-type': 'multipart/form-data',
+          },
+        }).then((res) => {
+          if (res.code === 200) {
+            this.$message.success('保存成功')
+            this.cancel()
+          } else {
+            this.$message.error(res.message || '保存失败')
+          }
+        })
+      } else {
+        this.$axios({
+          method: 'post',
+          url: this.$api.sceneLibrary.saveScoringRules,
+          data: {
+            ...this.form,
+          },
+        }).then((res) => {
+          if (res.code === 200) {
+            this.$message.success('保存成功')
+            this.cancel()
+          } else {
+            this.$message.error(res.message || '保存失败')
+          }
+        })
+      }
     },
     cancel() {
       this.$router.replace({ path: '/gradingRulesList' })
@@ -210,11 +260,23 @@ export default {
       let rulesId = ''
       this.form.rulesId = rulesId = this.$route.query.rulesId
       this.form.share = this.share = this.$route.query.share
-
-      if (rulesId) {
+      // 场景评价
+      if (this.isScore) {
+        const { ruleName, ruleDescription, ruleType, scriptName } =
+          this.$store.state.evaluationInfo
+        this.form = Object.assign(this.form, {
+          ruleName,
+          ruleDescription,
+          ruleType,
+          scriptName,
+        })
+        this.ruleTypeDisabled = true
+      } else {
         this.$axios({
           method: 'post',
-          url: this.$api.sceneLibrary.queryScoringRules,
+          url: this.isScore
+            ? this.$api.sceneLibrary.queryScoringRulesInfo
+            : this.$api.sceneLibrary.queryScoringRules,
           data: {
             rulesId,
           },

+ 37 - 13
src/views/sceneLibrary/gradingRulesList.vue

@@ -147,7 +147,8 @@
               v-if="
                 ((roleCode === '0' || roleCode === '1') &&
                   activeName === '1') ||
-                activeName === '2'
+                activeName === '2' ||
+                activeName === '3'
               "
               @click="delRow(scope.row)"
               class="el-icon-delete elIcon"
@@ -168,7 +169,7 @@
 import searchLayout from '@/components/grid/searchLayout'
 import tableList from '@/components/grid/TableList'
 import toolbarTab from '@/components/toolbar/toolbarTab'
-import {ruleTypeOpts} from './common'
+import { ruleTypeOpts } from './common'
 import { mapState } from 'vuex'
 
 export default {
@@ -251,9 +252,9 @@ export default {
   methods: {
     pageControl(data) {
       // 场景评价 切换接口地址
-      if(data.name=='3'){
+      if (data.name == '3') {
         this.getDataWay.data = this.$api.sceneLibrary.querySceneScoringRulesList
-      }else{
+      } else {
         // 公有 私有
         this.getDataWay.data = this.$api.sceneLibrary.queryScoringRulesList
       }
@@ -352,6 +353,11 @@ export default {
       })
     },
     delRow(row) {
+      const obj = this.activeName=='3'?{
+        ruleId: row.ruleId
+      }:{
+        rulesId:row.rulesId
+      }
       this.$confirm('确认是否删除?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -359,10 +365,11 @@ export default {
       }).then(() => {
         this.$axios({
           method: 'post',
-          url: this.$api.sceneLibrary.deleteScoringRules,
-          data: {
-            rulesId: row.rulesId,
-          },
+          url:
+            this.activeName == '3'
+              ? this.$api.sceneLibrary.deleteSceneEvaluationRule
+              : this.$api.sceneLibrary.deleteScoringRules,
+          data: obj,
         }).then((res) => {
           if (res.code == 200) {
             this.$message.success('删除成功')
@@ -374,19 +381,36 @@ export default {
       })
     },
     editRow(row) {
+      console.log('row', row)
       this.$store.commit('getTabname', 'gradingRuleDetailTabName', row.ruleName)
       localStorage.setItem('gradingRuleDetailTabName', row.ruleName)
-
+      if (this.activeName == '3') {
+        this.$store.commit('getEvaluationInfo', {
+          ruleName: row.ruleName,
+          ruleDescription: row.ruleDescription,
+          ruleType: row.ruleType,
+          scriptName: row.scriptName,
+        })
+      }
+      const objs =
+        this.activeName == '3'
+          ? {
+              rulesId: row.rulesId || row.ruleId,
+              share: -1,
+              isScore: true,
+            }
+          : {
+              rulesId: row.rulesId || row.ruleId,
+              share: row.share,
+            }
       this.$router.push({
         path: '/gradingRuleDetail',
         // params: {
         //     rulesId: row.rulesId,
         //     share: row.share,
         // },
-        query: {
-          rulesId: row.rulesId,
-          share: row.share,
-        },
+
+        query: objs,
       })
     },
   },

+ 7 - 96
src/views/sceneLibrary/naturalDrivingScenarioList.vue

@@ -235,6 +235,7 @@
             title="查看"
           >
           </i>
+          <span @click="jumpScene(scope.row)" class="elIcon"> 场景评价 </span>
         </template>
       </el-table-column>
     </tableList>
@@ -380,102 +381,6 @@ export default {
 
   methods: {
     doSearch() {
-      /* this.searchParams.highSpeed = this.labels.includes("1")
-                ? [["roadType", "高速"]]
-                : [];
-            this.searchParams.cutIn = this.labels.includes("2")
-                ? [
-                      [
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "机动车从左侧切入成功",
-                      ],
-                      [
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "机动车从右侧切入成功",
-                      ],
-                  ]
-                : [];
-            this.searchParams.cutOut = this.labels.includes("3")
-                ? [
-                      [
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "机动车向左侧切出成功",
-                      ],
-                      [
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "targetBehavior",
-                          "机动车向右侧切出成功",
-                      ],
-                  ]
-                : [];
-            this.searchParams.laneChange = this.labels.includes("4")
-                ? [
-                      [
-                          "selfBehavior",
-                          "selfBehavior",
-                          "selfBehavior",
-                          "向左变道成功",
-                      ],
-                      [
-                          "selfBehavior",
-                          "selfBehavior",
-                          "selfBehavior",
-                          "向右变道成功",
-                      ],
-                      [
-                          "selfBehavior",
-                          "selfBehavior",
-                          "selfBehavior",
-                          "向左连续变道",
-                      ],
-                      [
-                          "selfBehavior",
-                          "selfBehavior",
-                          "selfBehavior",
-                          "向右连续变道",
-                      ],
-                      [
-                          "selfBehavior",
-                          "selfBehavior",
-                          "selfBehavior",
-                          "向左变道超车",
-                      ],
-                      [
-                          "selfBehavior",
-                          "selfBehavior",
-                          "selfBehavior",
-                          "向右变道超车",
-                      ],
-                  ]
-                : [];
-            this.searchParams.ramp = this.labels.includes("5")
-                ? [["ramp", "是"]]
-                : [];
-            this.searchParams.tunnel = this.labels.includes("6")
-                ? [["tunnel", "是"]]
-                : [];
-            this.searchParams.turnAround = this.labels.includes("7")
-                ? [
-                      ["selfBehavior", "直路掉头"],
-                      ["selfBehavior", "selfBehavior", "路口掉头"],
-                  ]
-                : []; */
-
       this.searchParams.share = this.activeName === '1' ? '1' : '0'
       this.refreshList(this.searchParams)
     },
@@ -589,6 +494,12 @@ export default {
           break
       }
     },
+    jumpScene(row) {
+      this.$store.commit('getSceneId', row.naturalId)
+      this.$router.push({
+        path: '/sceneEvaluation',
+      })
+    },
     viewRow(row) {
       if (!row.videoAddress) {
         this.$message.warning('本场景无仿真视频')

+ 95 - 52
src/views/sceneLibrary/sceneEvaluation.vue

@@ -4,7 +4,7 @@
       width: 100%;
       display: flex;
       flex-direction: column;
-      padding: 20px 100px;
+      padding: 20px 50px;
     "
   >
     <!-- 复杂度详情 -->
@@ -18,37 +18,16 @@
     >
       复杂度详情
     </p>
-    <el-table :data="complexData" style="width: 100%" stripe>
-      <el-table-column label="序号" width="100" align="center">
-        <template slot-scope="scope">{{ scope.$index + 1 }}</template>
-      </el-table-column>
-      <el-table-column
-        prop="ruleName"
-        label="评分规则"
-        width="180"
-        align="center"
-      >
-      </el-table-column>
-      <el-table-column prop="complexity" label="复杂度" align="center">
-      </el-table-column>
-      <el-table-column prop="complexityLevel" label="复杂度等级" align="center">
-      </el-table-column>
-    </el-table>
-    <!-- 分页 -->
-    <div
-      style="width: 100%; display: flex; justify-content: end; margin: 30px 0"
+    <tableList
+      ref="table"
+      style="margin: 40px 30px 30px"
+      :columns="columns1"
+      :getDataWay="getDataWay1"
+      :pagination="pagination1"
+      index
+      indexFixed
     >
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="complexCurPage"
-        :page-sizes="[5, 10, 20, 50]"
-        :page-size="complexPageSize"
-        :total="complexData.length"
-        layout="total, sizes, prev, pager, next, jumper"
-      >
-      </el-pagination>
-    </div>
+    </tableList>
     <!-- 危险度详情 -->
     <p
       style="
@@ -60,26 +39,16 @@
     >
       危险度详情
     </p>
-    <el-table :data="dangerData" style="width: 100%" stripe>
-      <el-table-column label="序号" width="100" align="center">
-        <template slot-scope="scope">{{ scope.$index + 1 }}</template>
-      </el-table-column>
-      <el-table-column
-        prop="ruleName"
-        label="评分规则"
-        width="180"
-        align="center"
-      >
-      </el-table-column>
-      <el-table-column prop="algorithmName" label="评价算法" align="center">
-      </el-table-column>
-      <el-table-column prop="vehicleName" label="评价车型" align="center">
-      </el-table-column>
-      <el-table-column prop="risk" label="危险度" align="center">
-      </el-table-column>
-      <el-table-column prop="riskLevel" label="危险度等级" align="center">
-      </el-table-column>
-    </el-table>
+    <tableList
+      ref="table"
+      style="margin: 40px 30px 30px"
+      :columns="columns2"
+      :getDataWay="getDataWay2"
+      :pagination="pagination2"
+      index
+      indexFixed
+    >
+    </tableList>
     <!-- 分页 -->
     <div
       style="width: 100%; display: flex; justify-content: end; margin: 30px 0"
@@ -99,9 +68,82 @@
 </template>
 
 <script>
+import tableList from '@/components/grid/TableList'
 export default {
+  components: { tableList },
   data() {
     return {
+      sceneId: '',
+      columns1: [
+        {
+          label: '评分规则',
+          prop: 'ruleName',
+        },
+        {
+          label: '复杂度',
+          prop: 'complexity',
+        },
+        {
+          label: '复杂度等级',
+          prop: 'complexityLevel',
+        },
+      ],
+      columns2: [
+        {
+          label: '评分规则',
+          prop: 'ruleName',
+        },
+        {
+          label: '评价算法',
+          prop: 'algorithmName',
+        },
+        {
+          label: '评价车型',
+          prop: 'vehicleName',
+        },
+        {
+          label: '危险度',
+          prop: 'risk',
+        },
+        {
+          label: '危险度等级',
+          prop: 'riskLevel',
+        },
+      ],
+      getDataWay1: {
+        //加载表格数据
+        dataType: 'url',
+        type: 'post',
+        data: this.$api.sceneLibrary.queryComplexityDetail,
+        param: {
+          sceneId: this.$store.state.sceneId,
+        },
+      },
+      getDataWay2: {
+        //加载表格数据
+        dataType: 'url',
+        type: 'post',
+        data: this.$api.sceneLibrary.queryRiskDetail,
+        param: {
+          sceneId: this.$store.state.sceneId,
+        },
+      },
+      pagination1: {
+        //分页使用
+        currentPage: 1,
+        pageSize: 10,
+        position: 'right',
+        pageSizes: [10, 30, 50, 100, 200],
+        layout: 'sizes, total, prev, pager, next, jumper',
+      },
+      pagination2: {
+        //分页使用
+        currentPage: 1,
+        pageSize: 10,
+        position: 'right',
+        pageSizes: [10, 30, 50, 100, 200],
+        layout: 'sizes, total, prev, pager, next, jumper',
+      },
       complexData: [
         {
           sceneId: '',
@@ -135,7 +177,7 @@ export default {
           algorithmName: 11,
           vehicleId: 11,
           vehicleName: 51,
-        }
+        },
       ],
       complexCurPage: 1, // 复杂度页码
       complexPageSize: 5, // 复杂度页条数
@@ -151,5 +193,6 @@ export default {
       this.currentPage = val
     },
   },
+  mounted() {},
 }
 </script>

+ 310 - 308
src/views/sceneLibrary/standardRegulationSimulationScenarioList.vue

@@ -1,47 +1,47 @@
 <template>
-    <div>
-        <search-layout :needBox="true">
-            <template slot="searchItem1">
-                <span class="label">场景名称</span>
-                <el-input
-                    v-model="searchParams.sceneName"
-                    size="small"
-                    maxlength="60"
-                    clearable
-                    placeholder="请输入"
-                    @keyup.enter.native="doSearch"
-                >
-                </el-input>
-            </template>
-            <template slot="searchItem2">
-                <span class="label">法规类型</span>
-                <el-select
-                    v-model="searchParams.regulationType"
-                    multiple
-                    clearable
-                    size="small"
-                >
-                    <el-option
-                        v-for="item in regulationTypeList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template>
-            <template slot="searchItem3">
-                <span class="label">标准类型</span>
-                <el-input
-                    v-model="searchParams.standardType"
-                    size="small"
-                    maxlength="60"
-                    clearable
-                    placeholder="请输入"
-                    @keyup.enter.native="doSearch"
-                >
-                </el-input>
-            </template>
-                 <!-- 复杂度 -->
+  <div>
+    <search-layout :needBox="true">
+      <template slot="searchItem1">
+        <span class="label">场景名称</span>
+        <el-input
+          v-model="searchParams.sceneName"
+          size="small"
+          maxlength="60"
+          clearable
+          placeholder="请输入"
+          @keyup.enter.native="doSearch"
+        >
+        </el-input>
+      </template>
+      <template slot="searchItem2">
+        <span class="label">法规类型</span>
+        <el-select
+          v-model="searchParams.regulationType"
+          multiple
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="item in regulationTypeList"
+            :label="item.caption"
+            :value="item.code"
+            :key="item.code"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem3">
+        <span class="label">标准类型</span>
+        <el-input
+          v-model="searchParams.standardType"
+          size="small"
+          maxlength="60"
+          clearable
+          placeholder="请输入"
+          @keyup.enter.native="doSearch"
+        >
+        </el-input>
+      </template>
+      <!-- 复杂度 -->
       <template slot="searchItem6">
         <span class="label">复杂度</span>
         <el-input
@@ -123,8 +123,8 @@
           ></el-option>
         </el-select>
       </template>
-            <template slot="searchItem27">
-                <!-- <el-checkbox-group v-model="labels">
+      <template slot="searchItem27">
+        <!-- <el-checkbox-group v-model="labels">
                     <el-checkbox-button label="ISO" :key="1" class="labelA"
                         >ISO</el-checkbox-button
                     >
@@ -138,293 +138,295 @@
                         >E-NCAP</el-checkbox-button
                     >
                 </el-checkbox-group> -->
-                <div class="labelsBox">
-                    <b class="labelA" @click="conditions(1)">ISO</b>
-                    <b class="labelB" @click="conditions(2)">GB</b>
-                    <b class="labelC" @click="conditions(3)">C-NCAP</b>
-                    <b class="labelD" @click="conditions(4)">E-NCAP</b>
-                </div>
-            </template>
-            <template slot="searchBtn1">
-                <el-button type="primary" @click="doSearch">查询</el-button>
-            </template>
-            <template slot="searchBtn2">
-                <el-button type="primary" @click="doReset">重置</el-button>
-            </template>
-        </search-layout>
-
-        <div class="myTabsBox">
-            <el-tabs v-model="activeName" type="card" @tab-click="pageControl">
-                <el-tab-pane label="公有" name="1"></el-tab-pane>
-                <el-tab-pane label="私有" name="2"></el-tab-pane>
-            </el-tabs>
+        <div class="labelsBox">
+          <b class="labelA" @click="conditions(1)">ISO</b>
+          <b class="labelB" @click="conditions(2)">GB</b>
+          <b class="labelC" @click="conditions(3)">C-NCAP</b>
+          <b class="labelD" @click="conditions(4)">E-NCAP</b>
         </div>
+      </template>
+      <template slot="searchBtn1">
+        <el-button type="primary" @click="doSearch">查询</el-button>
+      </template>
+      <template slot="searchBtn2">
+        <el-button type="primary" @click="doReset">重置</el-button>
+      </template>
+    </search-layout>
 
-        <tableList
-            ref="table"
-            style="margin: 0 30px 30px"
-            :columns="columns"
-            :getDataWay="getDataWay"
-            :pagination="pagination"
-            index
-        >
-            <el-table-column
-                label="操作"
-                slot="cgInfos"
-                align="center"
-                width="180"
-            >
-                <template v-slot="scope">
-                    <i
-                        @click="viewRow(scope.row)"
-                        class="el-icon-view elIcon cursor"
-                        title="查看"
-                    >
-                    </i>
-                </template>
-            </el-table-column>
-        </tableList>
-
-        <el-dialog
-            :title="videoDiaTitle"
-            :visible.sync="dialogVisible"
-            width="690px"
-            :close-on-click-modal="false"
-            :close-on-press-escape="false"
-            :before-close="diaClose"
-        >
-            <div class="videoBox">
-                <video autoplay :src="videoSrc" controls></video>
-            </div>
-        </el-dialog>
+    <div class="myTabsBox">
+      <el-tabs v-model="activeName" type="card" @tab-click="pageControl">
+        <el-tab-pane label="公有" name="1"></el-tab-pane>
+        <el-tab-pane label="私有" name="2"></el-tab-pane>
+      </el-tabs>
     </div>
+
+    <tableList
+      ref="table"
+      style="margin: 0 30px 30px"
+      :columns="columns"
+      :getDataWay="getDataWay"
+      :pagination="pagination"
+      index
+    >
+      <el-table-column label="操作" slot="cgInfos" align="center" width="180">
+        <template v-slot="scope">
+          <i
+            @click="viewRow(scope.row)"
+            class="el-icon-view elIcon cursor"
+            title="查看"
+          >
+          </i>
+          <span @click="jumpScene(scope.row)" class="elIcon"> 场景评价 </span>
+        </template>
+      </el-table-column>
+    </tableList>
+
+    <el-dialog
+      :title="videoDiaTitle"
+      :visible.sync="dialogVisible"
+      width="690px"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :before-close="diaClose"
+    >
+      <div class="videoBox">
+        <video autoplay :src="videoSrc" controls></video>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-import searchLayout from "@/components/grid/searchLayout";
-import tableList from "@/components/grid/TableList";
-import { mapState } from "vuex";
+import searchLayout from '@/components/grid/searchLayout'
+import tableList from '@/components/grid/TableList'
+import { mapState } from 'vuex'
 
 export default {
-    name: "standardRegulationSimulationScenarioList", // 标准法规场景
-    components: { searchLayout, tableList },
-    data() {
-        return {
-            activeName: "2",
-            searchParams: {
-                //搜索参数
-                sceneName: "", //场景名称
-                regulationType: [], //法规类型
-                standardType: "", //标准类型
-                label: [],
-                share: "0",
-            },
-            labels: [], // 标签
-            regulationTypeList: [],
-            columns: [
-                //表格列
-                {
-                    label: "场景名称",
-                    prop: "sceneName",
-                },
-                {
-                    label: "法规类型",
-                    prop: "regulationType",
-                },
-                {
-                    label: "标准类型",
-                    prop: "standardType",
-                },
-                {
-                    label: "标签",
-                    prop: "regulationType",
-                },
-                {
-                label: '复杂度',
-                prop: 'complexity',
-                },
-                {
-                label: '复杂度等级',
-                prop: 'complexityLevel',
-                },
-                {
-                label: '危险度',
-                prop: 'risk',
-                },
-                {
-                label: '危险度等级',
-                prop: 'riskLevel',
-                },
-                {
-                    label: "操作",
-                    prop: "cgInfos",
-                    template: true,
-                    // videoAddress
-                },
-            ],
-            pagination: {
-                //分页使用
-                currentPage: 1,
-                pageSize: 10,
-                position: "right",
-                pageSizes: [10, 30, 50, 100, 200],
-                layout: "sizes, total, prev, pager, next, jumper",
-            },
-            getDataWay: {
-                //加载表格数据
-                dataType: "url",
-                type: "post",
-                // firstRequest: false,
-                data: this.$api.sceneLibrary.queryStandardsRegulationsList,
-                param: {
-                    share: "0",
-                },
-            },
-            dialogVisible: false,
-            autoplay: false,
-            videoSrc: "",
-            objectPath: "",
-            videoDiaTitle: "",
-        };
-    },
-
-    computed: {
-        ...mapState(["fileHost", "fileUrl"]),
-    },
-
-    methods: {
-        doSearch() {
-            // this.searchParams.label = [...this.labels];
-            this.searchParams.share = this.activeName === "1" ? "1" : "0";
-            this.refreshList(this.searchParams);
+  name: 'standardRegulationSimulationScenarioList', // 标准法规场景
+  components: { searchLayout, tableList },
+  data() {
+    return {
+      activeName: '2',
+      searchParams: {
+        //搜索参数
+        sceneName: '', //场景名称
+        regulationType: [], //法规类型
+        standardType: '', //标准类型
+        label: [],
+        share: '0',
+      },
+      labels: [], // 标签
+      regulationTypeList: [],
+      columns: [
+        //表格列
+        {
+          label: '场景名称',
+          prop: 'sceneName',
         },
-        //刷新table
-        refreshList(param) {
-            param
-                ? this.$refs["table"].loadData(param)
-                : this.$refs["table"].loadData();
+        {
+          label: '法规类型',
+          prop: 'regulationType',
         },
-        doReset() {
-            this.searchParams = {
-                sceneName: "",
-                regulationType: [],
-                standardType: "",
-                label: [],
-                share: this.activeName === "1" ? "1" : "0",
-            };
-            // this.labels = [];
-            this.doSearch();
+        {
+          label: '标准类型',
+          prop: 'standardType',
         },
-        pageControl(data) {
-            this.activeName = data.name;
-            this.doSearch();
+        {
+          label: '标签',
+          prop: 'regulationType',
         },
-        conditions(v) {
-            switch (v) {
-                case 1:
-                    if (!this.searchParams.regulationType.includes("ISO")) {
-                        this.searchParams.regulationType = [
-                            ...this.searchParams.regulationType,
-                            "ISO",
-                        ];
-                    }
-                    break;
-                case 2:
-                    if (!this.searchParams.regulationType.includes("GB")) {
-                        this.searchParams.regulationType = [
-                            ...this.searchParams.regulationType,
-                            "GB",
-                        ];
-                    }
-                    break;
-                case 3:
-                    if (!this.searchParams.regulationType.includes("C-NCAP")) {
-                        this.searchParams.regulationType = [
-                            ...this.searchParams.regulationType,
-                            "C-NCAP",
-                        ];
-                    }
-                    break;
-                case 4:
-                    if (!this.searchParams.regulationType.includes("E-NCAP")) {
-                        this.searchParams.regulationType = [
-                            ...this.searchParams.regulationType,
-                            "E-NCAP",
-                        ];
-                    }
-                    break;
-                default:
-                    break;
-            }
+        {
+          label: '复杂度',
+          prop: 'complexity',
         },
-        viewRow(row) {
-            if (!row.videoAddress) {
-                this.$message.warning("本场景无仿真视频");
-                return;
-            }
-            
-            this.dialogVisible = true;
-            this.videoDiaTitle = row.sceneName;
-
-            let url = "";
-            if (process.env.VUE_APP_IS_DEV == "true") {
-                url = this.fileHost + this.fileUrl;
-            } else {
-                url = this.fileUrl;
-            }
-
-            let token = localStorage.getItem("Authorization").split(" ")[1];
-            this.videoSrc = `${url}?objectName=${row.videoAddress}&access_token=${token}`;
-            this.autoplay = true;
+        {
+          label: '复杂度等级',
+          prop: 'complexityLevel',
         },
-        delRow(row) {
-            this.$confirm("确认是否删除?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-            }).then(() => {
-                this.$axios({
-                    method: "post",
-                    url: this.$api.sceneLibrary.deleteStandardsRegulations,
-                    data: {
-                        regulationsId: row.regulationsId,
-                    },
-                }).then((res) => {
-                    if (res.code == 200) {
-                        this.$message.success("删除成功");
-                    } else {
-                        this.$message.error(res.message || "删除失败");
-                    }
-                    this.doSearch();
-                });
-            });
+        {
+          label: '危险度',
+          prop: 'risk',
         },
-        diaClose(done) {
-            this.autoplay = false;
-            this.videoSrc = "";
-            done();
+        {
+          label: '危险度等级',
+          prop: 'riskLevel',
         },
-        openFileDia() {
-            this.objectPath = Math.random().toString();
-            this.$refs.fileDialog.fileVisible = true;
+        {
+          label: '操作',
+          prop: 'cgInfos',
+          template: true,
+          // videoAddress
         },
-        fileClose() {
-            this.objectPath = "";
-            this.doSearch();
+      ],
+      pagination: {
+        //分页使用
+        currentPage: 1,
+        pageSize: 10,
+        position: 'right',
+        pageSizes: [10, 30, 50, 100, 200],
+        layout: 'sizes, total, prev, pager, next, jumper',
+      },
+      getDataWay: {
+        //加载表格数据
+        dataType: 'url',
+        type: 'post',
+        // firstRequest: false,
+        data: this.$api.sceneLibrary.queryStandardsRegulationsList,
+        param: {
+          share: '0',
         },
+      },
+      dialogVisible: false,
+      autoplay: false,
+      videoSrc: '',
+      objectPath: '',
+      videoDiaTitle: '',
+    }
+  },
+
+  computed: {
+    ...mapState(['fileHost', 'fileUrl']),
+  },
+
+  methods: {
+    doSearch() {
+      // this.searchParams.label = [...this.labels];
+      this.searchParams.share = this.activeName === '1' ? '1' : '0'
+      this.refreshList(this.searchParams)
+    },
+    //刷新table
+    refreshList(param) {
+      param
+        ? this.$refs['table'].loadData(param)
+        : this.$refs['table'].loadData()
+    },
+    doReset() {
+      this.searchParams = {
+        sceneName: '',
+        regulationType: [],
+        standardType: '',
+        label: [],
+        share: this.activeName === '1' ? '1' : '0',
+      }
+      // this.labels = [];
+      this.doSearch()
     },
+    pageControl(data) {
+      this.activeName = data.name
+      this.doSearch()
+    },
+    conditions(v) {
+      switch (v) {
+        case 1:
+          if (!this.searchParams.regulationType.includes('ISO')) {
+            this.searchParams.regulationType = [
+              ...this.searchParams.regulationType,
+              'ISO',
+            ]
+          }
+          break
+        case 2:
+          if (!this.searchParams.regulationType.includes('GB')) {
+            this.searchParams.regulationType = [
+              ...this.searchParams.regulationType,
+              'GB',
+            ]
+          }
+          break
+        case 3:
+          if (!this.searchParams.regulationType.includes('C-NCAP')) {
+            this.searchParams.regulationType = [
+              ...this.searchParams.regulationType,
+              'C-NCAP',
+            ]
+          }
+          break
+        case 4:
+          if (!this.searchParams.regulationType.includes('E-NCAP')) {
+            this.searchParams.regulationType = [
+              ...this.searchParams.regulationType,
+              'E-NCAP',
+            ]
+          }
+          break
+        default:
+          break
+      }
+    },
+    jumpScene(row) {
+      this.$store.commit('getSceneId', row.regulationsId)
+      this.$router.push({
+        path: '/sceneEvaluation',
+      })
+    },
+    viewRow(row) {
+      if (!row.videoAddress) {
+        this.$message.warning('本场景无仿真视频')
+        return
+      }
+
+      this.dialogVisible = true
+      this.videoDiaTitle = row.sceneName
 
-    async mounted() {
-        await this.$dicsListsInit({
-            regulationTypeList: "regulationType",
-        });
+      let url = ''
+      if (process.env.VUE_APP_IS_DEV == 'true') {
+        url = this.fileHost + this.fileUrl
+      } else {
+        url = this.fileUrl
+      }
+
+      let token = localStorage.getItem('Authorization').split(' ')[1]
+      this.videoSrc = `${url}?objectName=${row.videoAddress}&access_token=${token}`
+      this.autoplay = true
+    },
+    delRow(row) {
+      this.$confirm('确认是否删除?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
+        this.$axios({
+          method: 'post',
+          url: this.$api.sceneLibrary.deleteStandardsRegulations,
+          data: {
+            regulationsId: row.regulationsId,
+          },
+        }).then((res) => {
+          if (res.code == 200) {
+            this.$message.success('删除成功')
+          } else {
+            this.$message.error(res.message || '删除失败')
+          }
+          this.doSearch()
+        })
+      })
+    },
+    diaClose(done) {
+      this.autoplay = false
+      this.videoSrc = ''
+      done()
+    },
+    openFileDia() {
+      this.objectPath = Math.random().toString()
+      this.$refs.fileDialog.fileVisible = true
     },
-};
+    fileClose() {
+      this.objectPath = ''
+      this.doSearch()
+    },
+  },
+
+  async mounted() {
+    await this.$dicsListsInit({
+      regulationTypeList: 'regulationType',
+    })
+  },
+}
 </script>
 
 <style lang='less' scoped>
-@import "./common/util.less";
+@import './common/util.less';
 .btnsPanel {
-    text-align: right;
+  text-align: right;
 }
 </style>

+ 409 - 417
src/views/sceneLibrary/trafficAccidentSimulationScenarioList.vue

@@ -1,99 +1,99 @@
 <template>
-    <div class="trafficAccidentSimulationScenarioListPanel">
-        <search-layout :needBox="true">
-            <template slot="searchItem1">
-                <span class="label">场景名称</span>
-                <el-input
-                    v-model="searchParams.sceneName"
-                    size="small"
-                    clearable
-                    placeholder="请输入"
-                    maxlength="60"
-                    @keyup.enter.native="doSearch"
-                >
-                </el-input>
-            </template>
-            <template slot="searchItem2">
-                <span class="label">自车驾驶行为</span>
-                <el-select
-                    v-model="searchParams.selfDriving"
-                    multiple
-                    size="small"
-                    clearable
-                >
-                    <el-option
-                        v-for="item in selfDrivingList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template>
-            <template slot="searchItem3">
-                <span class="label">目标驾驶行为</span>
-                <el-select
-                    v-model="searchParams.targetDriving"
-                    multiple
-                    size="small"
-                    clearable
-                >
-                    <el-option
-                        v-for="item in targetDrivingList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template>
-            <template slot="searchItem4">
-                <span class="label">自车反应行为</span>
-                <el-select
-                    v-model="searchParams.selfReaction"
-                    multiple
-                    size="small"
-                    clearable
-                >
-                    <el-option
-                        v-for="item in selfReactionList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template>
-            <template slot="searchItem5">
-                <span class="label">冲突行为</span>
-                <el-select
-                    v-model="searchParams.conflictBehavior"
-                    multiple
-                    size="small"
-                    clearable
-                >
-                    <el-option
-                        v-for="item in conflictBehaviorList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template>
-            <template slot="searchItem6">
-                <span class="label">冲突类型</span>
-                <el-select
-                    v-model="searchParams.conflictType"
-                    multiple
-                    size="small"
-                    clearable
-                >
-                    <el-option
-                        v-for="item in conflictTypeList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template>
-                         <!-- 复杂度 -->
+  <div class="trafficAccidentSimulationScenarioListPanel">
+    <search-layout :needBox="true">
+      <template slot="searchItem1">
+        <span class="label">场景名称</span>
+        <el-input
+          v-model="searchParams.sceneName"
+          size="small"
+          clearable
+          placeholder="请输入"
+          maxlength="60"
+          @keyup.enter.native="doSearch"
+        >
+        </el-input>
+      </template>
+      <template slot="searchItem2">
+        <span class="label">自车驾驶行为</span>
+        <el-select
+          v-model="searchParams.selfDriving"
+          multiple
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in selfDrivingList"
+            :label="item.caption"
+            :value="item.code"
+            :key="item.code"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem3">
+        <span class="label">目标驾驶行为</span>
+        <el-select
+          v-model="searchParams.targetDriving"
+          multiple
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in targetDrivingList"
+            :label="item.caption"
+            :value="item.code"
+            :key="item.code"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem4">
+        <span class="label">自车反应行为</span>
+        <el-select
+          v-model="searchParams.selfReaction"
+          multiple
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in selfReactionList"
+            :label="item.caption"
+            :value="item.code"
+            :key="item.code"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem5">
+        <span class="label">冲突行为</span>
+        <el-select
+          v-model="searchParams.conflictBehavior"
+          multiple
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in conflictBehaviorList"
+            :label="item.caption"
+            :value="item.code"
+            :key="item.code"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem6">
+        <span class="label">冲突类型</span>
+        <el-select
+          v-model="searchParams.conflictType"
+          multiple
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in conflictTypeList"
+            :label="item.caption"
+            :value="item.code"
+            :key="item.code"
+          ></el-option>
+        </el-select>
+      </template>
+      <!-- 复杂度 -->
       <template slot="searchItem6">
         <span class="label">复杂度</span>
         <el-input
@@ -175,8 +175,8 @@
           ></el-option>
         </el-select>
       </template>
-            <template slot="searchItem27">
-                <!-- <el-checkbox-group v-model="labels">
+      <template slot="searchItem27">
+        <!-- <el-checkbox-group v-model="labels">
                     <el-checkbox-button label="追尾" :key="1" class="labelA"
                         >追尾</el-checkbox-button
                     >
@@ -196,188 +196,180 @@
                         >机动车-机动车冲突</el-checkbox-button
                     >
                 </el-checkbox-group> -->
-                <div class="labelsBox">
-                    <b class="labelA" @click="conditions(1)">追尾</b>
-                    <b class="labelB" @click="conditions(2)">目标车切入</b>
-                    <b class="labelC" @click="conditions(3)"
-                        >目标车沿弯道行驶</b
-                    >
-                    <b class="labelD" @click="conditions(4)"
-                        >机动车-机动车冲突</b
-                    >
-                </div>
-            </template>
-            <template slot="searchBtn1">
-                <el-button type="primary" @click="doSearch">查询</el-button>
-            </template>
-            <template slot="searchBtn2">
-                <el-button type="primary" @click="doReset">重置</el-button>
-            </template>
-        </search-layout>
-
-        <div class="myTabsBox">
-            <el-tabs v-model="activeName" type="card" @tab-click="pageControl">
-                <el-tab-pane label="公有" name="1"></el-tab-pane>
-                <el-tab-pane label="私有" name="2"></el-tab-pane>
-            </el-tabs>
+        <div class="labelsBox">
+          <b class="labelA" @click="conditions(1)">追尾</b>
+          <b class="labelB" @click="conditions(2)">目标车切入</b>
+          <b class="labelC" @click="conditions(3)">目标车沿弯道行驶</b>
+          <b class="labelD" @click="conditions(4)">机动车-机动车冲突</b>
         </div>
+      </template>
+      <template slot="searchBtn1">
+        <el-button type="primary" @click="doSearch">查询</el-button>
+      </template>
+      <template slot="searchBtn2">
+        <el-button type="primary" @click="doReset">重置</el-button>
+      </template>
+    </search-layout>
 
-        <tableList
-            ref="table"
-            style="margin: 0 30px 30px"
-            :columns="columns"
-            :getDataWay="getDataWay"
-            :pagination="pagination"
-            index
-        >
-            <el-table-column
-                label="操作"
-                slot="cgInfos"
-                align="center"
-                width="180"
-            >
-                <template v-slot="scope">
-                    <i
-                        @click="viewRow(scope.row)"
-                        class="el-icon-view elIcon cursor"
-                        title="查看"
-                    >
-                    </i>
-                </template>
-            </el-table-column>
-        </tableList>
-
-        <el-dialog
-            :title="videoDiaTitle"
-            :visible.sync="dialogVisible"
-            width="690px"
-            :close-on-click-modal="false"
-            :close-on-press-escape="false"
-            :before-close="diaClose"
-        >
-            <div class="videoBox">
-                <video autoplay :src="videoSrc" controls></video>
-            </div>
-        </el-dialog>
+    <div class="myTabsBox">
+      <el-tabs v-model="activeName" type="card" @tab-click="pageControl">
+        <el-tab-pane label="公有" name="1"></el-tab-pane>
+        <el-tab-pane label="私有" name="2"></el-tab-pane>
+      </el-tabs>
     </div>
+
+    <tableList
+      ref="table"
+      style="margin: 0 30px 30px"
+      :columns="columns"
+      :getDataWay="getDataWay"
+      :pagination="pagination"
+      index
+    >
+      <el-table-column label="操作" slot="cgInfos" align="center" width="180">
+        <template v-slot="scope">
+          <i
+            @click="viewRow(scope.row)"
+            class="el-icon-view elIcon cursor"
+            title="查看"
+          >
+          </i>
+          <span @click="jumpScene(scope.row)" class="elIcon"> 场景评价 </span>
+        </template>
+      </el-table-column>
+    </tableList>
+
+    <el-dialog
+      :title="videoDiaTitle"
+      :visible.sync="dialogVisible"
+      width="690px"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :before-close="diaClose"
+    >
+      <div class="videoBox">
+        <video autoplay :src="videoSrc" controls></video>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-import searchLayout from "@/components/grid/searchLayout";
-import tableList from "@/components/grid/TableList";
-import { mapState } from "vuex";
+import searchLayout from '@/components/grid/searchLayout'
+import tableList from '@/components/grid/TableList'
+import { mapState } from 'vuex'
 
 export default {
-    name: "trafficAccidentSimulationScenarioList", // 交通事故场景
-    components: { searchLayout, tableList },
-    data() {
-        return {
-            activeName: "2",
-            searchParams: {
-                //搜索参数
-                sceneName: "", //场景名称
-                selfDriving: [], //自车驾驶行为
-                targetDriving: [], //目标驾驶行为
-                selfReaction: [], //自车反应行为
-                conflictBehavior: [], //冲突行为
-                conflictType: [], //冲突类型
-                rearEndCollision: "", // 追尾
-                cutIn: "", // 切入
-                driveCurve: "", // 沿弯道行驶
-                carConflict: "", // 机动车-机动车冲突
-                share: "0",
-            },
-            labels: [],
-            selfDrivingList: [],
-            targetDrivingList: [],
-            selfReactionList: [],
-            conflictBehaviorList: [],
-            conflictTypeList: [],
-            columns: [
-                //表格列
-                {
-                    label: "场景名称",
-                    prop: "sceneName",
-                },
-                {
-                    label: "自车驾驶行为",
-                    prop: "selfDriving",
-                },
-                {
-                    label: "目标驾驶行为",
-                    prop: "targetDriving",
-                },
-                {
-                    label: "自车反应行为",
-                    prop: "selfReaction",
-                },
-                {
-                    label: "冲突行为",
-                    prop: "conflictBehavior",
-                },
-                {
-                    label: "冲突类型",
-                    prop: "conflictType",
-                },
-                {
-                    label: "标签",
-                    prop: "label",
-                },
-                {
-                label: '复杂度',
-                prop: 'complexity',
-                },
-                {
-                label: '复杂度等级',
-                prop: 'complexityLevel',
-                },
-                {
-                label: '危险度',
-                prop: 'risk',
-                },
-                {
-                label: '危险度等级',
-                prop: 'riskLevel',
-                },
-                {
-                    label: "操作",
-                    prop: "cgInfos",
-                    template: true,
-                },
-            ],
-            pagination: {
-                //分页使用
-                currentPage: 1,
-                pageSize: 10,
-                position: "right",
-                pageSizes: [10, 30, 50, 100, 200],
-                layout: "sizes, total, prev, pager, next, jumper",
-            },
-            getDataWay: {
-                //加载表格数据
-                dataType: "url",
-                type: "post",
-                // firstRequest: false,
-                data: this.$api.sceneLibrary.querySceneAccidentList,
-                param: {
-                    share: "0",
-                },
-            },
-            dialogVisible: false,
-            autoplay: false,
-            videoSrc: "",
-            objectPath: "",
-            videoDiaTitle: "",
-        };
-    },
+  name: 'trafficAccidentSimulationScenarioList', // 交通事故场景
+  components: { searchLayout, tableList },
+  data() {
+    return {
+      activeName: '2',
+      searchParams: {
+        //搜索参数
+        sceneName: '', //场景名称
+        selfDriving: [], //自车驾驶行为
+        targetDriving: [], //目标驾驶行为
+        selfReaction: [], //自车反应行为
+        conflictBehavior: [], //冲突行为
+        conflictType: [], //冲突类型
+        rearEndCollision: '', // 追尾
+        cutIn: '', // 切入
+        driveCurve: '', // 沿弯道行驶
+        carConflict: '', // 机动车-机动车冲突
+        share: '0',
+      },
+      labels: [],
+      selfDrivingList: [],
+      targetDrivingList: [],
+      selfReactionList: [],
+      conflictBehaviorList: [],
+      conflictTypeList: [],
+      columns: [
+        //表格列
+        {
+          label: '场景名称',
+          prop: 'sceneName',
+        },
+        {
+          label: '自车驾驶行为',
+          prop: 'selfDriving',
+        },
+        {
+          label: '目标驾驶行为',
+          prop: 'targetDriving',
+        },
+        {
+          label: '自车反应行为',
+          prop: 'selfReaction',
+        },
+        {
+          label: '冲突行为',
+          prop: 'conflictBehavior',
+        },
+        {
+          label: '冲突类型',
+          prop: 'conflictType',
+        },
+        {
+          label: '标签',
+          prop: 'label',
+        },
+        {
+          label: '复杂度',
+          prop: 'complexity',
+        },
+        {
+          label: '复杂度等级',
+          prop: 'complexityLevel',
+        },
+        {
+          label: '危险度',
+          prop: 'risk',
+        },
+        {
+          label: '危险度等级',
+          prop: 'riskLevel',
+        },
+        {
+          label: '操作',
+          prop: 'cgInfos',
+          template: true,
+        },
+      ],
+      pagination: {
+        //分页使用
+        currentPage: 1,
+        pageSize: 10,
+        position: 'right',
+        pageSizes: [10, 30, 50, 100, 200],
+        layout: 'sizes, total, prev, pager, next, jumper',
+      },
+      getDataWay: {
+        //加载表格数据
+        dataType: 'url',
+        type: 'post',
+        // firstRequest: false,
+        data: this.$api.sceneLibrary.querySceneAccidentList,
+        param: {
+          share: '0',
+        },
+      },
+      dialogVisible: false,
+      autoplay: false,
+      videoSrc: '',
+      objectPath: '',
+      videoDiaTitle: '',
+    }
+  },
 
-    computed: {
-        ...mapState(["fileHost", "fileUrl"]),
-    },
+  computed: {
+    ...mapState(['fileHost', 'fileUrl']),
+  },
 
-    methods: {
-        doSearch() {
-            /* this.searchParams.rearEndCollision = this.labels.includes("追尾")
+  methods: {
+    doSearch() {
+      /* this.searchParams.rearEndCollision = this.labels.includes("追尾")
                 ? "追尾"
                 : "";
             this.searchParams.cutIn = this.labels.includes("切入")
@@ -392,164 +384,164 @@ export default {
                 ? "机动车-机动车"
                 : ""; */
 
-            this.searchParams.share = this.activeName === "1" ? "1" : "0";
-            this.refreshList(this.searchParams);
-        },
-        //刷新table
-        refreshList(param) {
-            param
-                ? this.$refs["table"].loadData(param)
-                : this.$refs["table"].loadData();
-        },
-        doReset() {
-            this.searchParams = {
-                sceneName: "",
-                selfDriving: [],
-                targetDriving: [],
-                selfReaction: [],
-                conflictBehavior: [],
-                conflictType: [],
-                rearEndCollision: "",
-                cutIn: "",
-                driveCurve: "",
-                carConflict: "",
-                share: this.activeName === "1" ? "1" : "0",
-            };
-            // this.labels = [];
-            this.doSearch();
-        },
-        pageControl(data) {
-            this.activeName = data.name;
-            this.doSearch();
-        },
-        conditions(v) {
-            switch (v) {
-                case 1:
-                    if (!this.searchParams.conflictBehavior.includes("追尾")) {
-                        this.searchParams.conflictBehavior = [
-                            ...this.searchParams.conflictBehavior,
-                            "追尾",
-                        ];
-                    }
-                    break;
-                case 2:
-                    if (!this.searchParams.targetDriving.includes("切入")) {
-                        this.searchParams.targetDriving = [
-                            ...this.searchParams.targetDriving,
-                            "切入",
-                        ];
-                    }
-                    break;
-                case 3:
-                    if (
-                        !this.searchParams.targetDriving.includes("沿弯道行驶")
-                    ) {
-                        this.searchParams.targetDriving = [
-                            ...this.searchParams.targetDriving,
-                            "沿弯道行驶",
-                        ];
-                    }
-                    break;
-                case 4:
-                    if (
-                        !this.searchParams.conflictType.includes(
-                            "机动车-机动车"
-                        )
-                    ) {
-                        this.searchParams.conflictType = [
-                            ...this.searchParams.conflictType,
-                            "机动车-机动车",
-                        ];
-                    }
-                    break;
-                default:
-                    break;
-            }
-        },
-        viewRow(row) {
-            if (!row.videoAddress) {
-                this.$message.warning("本场景无仿真视频");
-                return;
-            }
-            
-            this.dialogVisible = true;
-            this.videoDiaTitle = row.sceneName;
+      this.searchParams.share = this.activeName === '1' ? '1' : '0'
+      this.refreshList(this.searchParams)
+    },
+    //刷新table
+    refreshList(param) {
+      param
+        ? this.$refs['table'].loadData(param)
+        : this.$refs['table'].loadData()
+    },
+    jumpScene(row) {
+      this.$store.commit('getSceneId', row.accidentId)
+      this.$router.push({
+        path: '/sceneEvaluation',
+      })
+    },
+    doReset() {
+      this.searchParams = {
+        sceneName: '',
+        selfDriving: [],
+        targetDriving: [],
+        selfReaction: [],
+        conflictBehavior: [],
+        conflictType: [],
+        rearEndCollision: '',
+        cutIn: '',
+        driveCurve: '',
+        carConflict: '',
+        share: this.activeName === '1' ? '1' : '0',
+      }
+      // this.labels = [];
+      this.doSearch()
+    },
+    pageControl(data) {
+      this.activeName = data.name
+      this.doSearch()
+    },
+    conditions(v) {
+      switch (v) {
+        case 1:
+          if (!this.searchParams.conflictBehavior.includes('追尾')) {
+            this.searchParams.conflictBehavior = [
+              ...this.searchParams.conflictBehavior,
+              '追尾',
+            ]
+          }
+          break
+        case 2:
+          if (!this.searchParams.targetDriving.includes('切入')) {
+            this.searchParams.targetDriving = [
+              ...this.searchParams.targetDriving,
+              '切入',
+            ]
+          }
+          break
+        case 3:
+          if (!this.searchParams.targetDriving.includes('沿弯道行驶')) {
+            this.searchParams.targetDriving = [
+              ...this.searchParams.targetDriving,
+              '沿弯道行驶',
+            ]
+          }
+          break
+        case 4:
+          if (!this.searchParams.conflictType.includes('机动车-机动车')) {
+            this.searchParams.conflictType = [
+              ...this.searchParams.conflictType,
+              '机动车-机动车',
+            ]
+          }
+          break
+        default:
+          break
+      }
+    },
+    viewRow(row) {
+      if (!row.videoAddress) {
+        this.$message.warning('本场景无仿真视频')
+        return
+      }
 
-            let url = "";
-            if (process.env.VUE_APP_IS_DEV == "true") {
-                url = this.fileHost + this.fileUrl;
-            } else {
-                url = this.fileUrl;
-            }
+      this.dialogVisible = true
+      this.videoDiaTitle = row.sceneName
 
-            let token = localStorage.getItem("Authorization").split(" ")[1];
-            this.videoSrc = `${url}?objectName=${row.videoAddress}&access_token=${token}`;
-            this.autoplay = true;
-        },
-        delRow(row) {
-            this.$confirm("确认是否删除?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-            }).then(() => {
-                this.$axios({
-                    method: "post",
-                    url: this.$api.sceneLibrary.deleteSceneAccident,
-                    data: {
-                        accidentId: row.accidentId,
-                    },
-                }).then((res) => {
-                    if (res.code == 200) {
-                        this.$message.success("删除成功");
-                    } else {
-                        this.$message.error(res.message || "删除失败");
-                    }
-                    this.doSearch();
-                });
-            });
-        },
-        diaClose(done) {
-            this.autoplay = false;
-            this.videoSrc = "";
-            done();
-        },
-        openFileDia() {
-            this.objectPath = Math.random().toString();
-            this.$refs.fileDialog.fileVisible = true;
-        },
-        fileClose() {
-            this.objectPath = "";
-            this.doSearch();
-        },
-    },
+      let url = ''
+      if (process.env.VUE_APP_IS_DEV == 'true') {
+        url = this.fileHost + this.fileUrl
+      } else {
+        url = this.fileUrl
+      }
 
-    async mounted() {
-        await this.$dicsListsInit({
-            selfDrivingList: "selfDriving",
-            targetDrivingList: "targetDriving",
-            selfReactionList: "selfReaction",
-            conflictBehaviorList: "conflictBehavior",
-            conflictTypeList: "conflictType",
-        });
+      let token = localStorage.getItem('Authorization').split(' ')[1]
+      this.videoSrc = `${url}?objectName=${row.videoAddress}&access_token=${token}`
+      this.autoplay = true
+    },
+    delRow(row) {
+      this.$confirm('确认是否删除?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
+        this.$axios({
+          method: 'post',
+          url: this.$api.sceneLibrary.deleteSceneAccident,
+          data: {
+            accidentId: row.accidentId,
+          },
+        }).then((res) => {
+          if (res.code == 200) {
+            this.$message.success('删除成功')
+          } else {
+            this.$message.error(res.message || '删除失败')
+          }
+          this.doSearch()
+        })
+      })
     },
-};
+    diaClose(done) {
+      this.autoplay = false
+      this.videoSrc = ''
+      done()
+    },
+    openFileDia() {
+      this.objectPath = Math.random().toString()
+      this.$refs.fileDialog.fileVisible = true
+    },
+    fileClose() {
+      this.objectPath = ''
+      this.doSearch()
+    },
+  },
+
+  async mounted() {
+    await this.$dicsListsInit({
+      selfDrivingList: 'selfDriving',
+      targetDrivingList: 'targetDriving',
+      selfReactionList: 'selfReaction',
+      conflictBehaviorList: 'conflictBehavior',
+      conflictTypeList: 'conflictType',
+    })
+  },
+}
 </script>
 
 <style lang='less' scoped>
-@import "./common/util.less";
+@import './common/util.less';
 .trafficAccidentSimulationScenarioListPanel {
-    .inputBox {
-        .radioBox {
-            width: 340px;
-        }
-
-        .label {
-            min-width: 90px;
-        }
+  .inputBox {
+    .radioBox {
+      width: 340px;
     }
 
-    .btnsPanel {
-        text-align: right;
+    .label {
+      min-width: 90px;
     }
+  }
+
+  .btnsPanel {
+    text-align: right;
+  }
 }
 </style>

+ 228 - 168
src/views/systemManagement/sceneLibraryManagement/benchmarkScenario.vue

@@ -4,7 +4,7 @@
       <template slot="searchItem1">
         <span class="label">场景名称</span>
         <el-input
-          v-model="searchParams.sceneId"
+          v-model="searchParams.sceneName"
           size="small"
           clearable
           placeholder="请输入"
@@ -13,129 +13,212 @@
         >
         </el-input>
       </template>
-      <template slot="searchItem2">
+      <template slot="searchItem1">
         <span class="label">主车动作</span>
         <el-select
-          v-model="searchParams.fileName"
-          multiple
+          v-model="searchParams.mainBehavior[0][1]"
           size="small"
           clearable
         >
           <el-option
-            v-for="item in fileNameList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
+            v-for="item in ['汇入']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem2">
+        <span class="label">他车动作</span>
+        <el-select
+          v-model="searchParams.otherBehavior[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['直行']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem2">
+        <span class="label">天气</span>
+        <el-select v-model="searchParams.weather[0][1]" size="small" clearable>
+          <el-option
+            v-for="item in ['晴']"
+            :label="item"
+            :value="item"
+            :key="item"
           ></el-option>
         </el-select>
       </template>
-      <!-- 复杂度 -->
       <template slot="searchItem3">
+        <span class="label">道路类型</span>
+        <el-select v-model="searchParams.roadType[0][1]" size="small" clearable>
+          <el-option
+            v-for="item in ['高速']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem3">
+        <span class="label">道路几何-平面</span>
+        <el-select
+          v-model="searchParams.roadGeometryPlane[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['直道']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem4">
+        <span class="label">道路几何-纵断面</span>
+        <el-select
+          v-model="searchParams.roadGeometryVertical[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['上坡']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem4">
+        <span class="label">智能驾驶</span>
+        <el-select
+          v-model="searchParams.autoDriveFunction[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['ACC', 'AEB']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <template slot="searchItem5">
+        <span class="label">运行区域</span>
+        <el-select
+          v-model="searchParams.operationArea[0][1]"
+          size="small"
+          clearable
+        >
+          <el-option
+            v-for="item in ['主路']"
+            :label="item"
+            :value="item"
+            :key="item"
+          ></el-option>
+        </el-select>
+      </template>
+      <!-- 复杂度 -->
+      <template slot="searchItem5">
         <span class="label">复杂度</span>
         <el-input
-          v-model="searchParams.a"
+          v-model="searchParams.minComplexity"
           size="small"
           clearable
           placeholder="请输入"
           maxlength="60"
-          @keyup.enter.native="doSearch"
           style="width: 100px"
         >
         </el-input>
         <span class="dateSeparator">至</span>
         <el-input
-          v-model="searchParams.b"
+          v-model="searchParams.maxComplexity"
           size="small"
           clearable
           placeholder="请输入"
           maxlength="60"
-          @keyup.enter.native="doSearch"
           style="width: 100px"
         >
         </el-input>
       </template>
       <!-- 危险度 -->
-      <template slot="searchItem3">
+      <template slot="searchItem6">
         <span class="label">危险度</span>
         <el-input
-          v-model="searchParams.a"
+          v-model="searchParams.minRisk"
           size="small"
           clearable
           placeholder="请输入"
           maxlength="60"
-          @keyup.enter.native="doSearch"
           style="width: 100px"
         >
         </el-input>
         <span class="dateSeparator">至</span>
         <el-input
-          v-model="searchParams.b"
+          v-model="searchParams.maxRisk"
           size="small"
           clearable
           placeholder="请输入"
           maxlength="60"
-          @keyup.enter.native="doSearch"
           style="width: 100px"
         >
         </el-input>
       </template>
-      <template slot="searchItem5">
+      <template slot="searchItem6">
         <span class="label">复杂度等级</span>
         <el-select
-          v-model="searchParams.scenarioRoadType"
-          multiple
+          v-model="searchParams.complexityLevel"
           size="small"
           clearable
         >
           <el-option
-            v-for="item in scenarioRoadTypeList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
+            v-for="item in ['S', 'AA', 'A', 'B', 'C']"
+            :label="item"
+            :value="item"
+            :key="item"
           ></el-option>
         </el-select>
       </template>
-      <template slot="searchItem5">
+      <template slot="searchItem7">
         <span class="label">危险度等级</span>
-        <el-select
-          v-model="searchParams.scenarioRoadType"
-          multiple
-          size="small"
-          clearable
-        >
+        <el-select v-model="searchParams.riskLevel" size="small" clearable>
           <el-option
-            v-for="item in scenarioRoadTypeList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
+            v-for="item in ['S', 'AA', 'A', 'B', 'C']"
+            :label="item"
+            :value="item"
+            :key="item"
           ></el-option>
         </el-select>
       </template>
-      <!-- <template slot="searchItem3">
-                <span class="label">天气</span>
-                <el-select
-                    v-model="searchParams.scenarioWeather"
-                    multiple
-                    size="small"
-                    clearable
-                >
-                    <el-option
-                        v-for="item in scenarioWeatherList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template> -->
-      <!-- <template slot="searchItem4">
-                <span class="label">场景发生时刻</span>
-                <el-time-picker
-                    v-model="searchParams.scenarioTime"
-                    value-format="HH:mm:ss"
-                    placeholder="请选择"
-                >
-                </el-time-picker>
-            </template> -->
+      <template slot="searchItem7">
+        <span class="label">标签</span>
+        <el-input
+          v-model="searchParams.label"
+          size="small"
+          clearable
+          placeholder="请输入"
+          maxlength="60"
+        >
+        </el-input>
+      </template>
+      <template slot="searchItem8">
+        <span class="label">场景描述</span>
+        <el-input
+          v-model="searchParams.sceneDescription"
+          size="small"
+          clearable
+          placeholder="请输入"
+          maxlength="60"
+        >
+        </el-input>
+      </template>
       <template slot="searchBtn1">
         <el-button type="primary" @click="doSearch">查询</el-button>
       </template>
@@ -167,13 +250,15 @@
         fixed="right"
       >
         <template v-slot="scope">
-          <i class="el-icon-view elIcon cursor" title="查看"> </i>
           <i
-            @click="delRow(scope.row)"
-            class="el-icon-delete elIcon"
-            title="删除"
+            class="el-icon-view elIcon cursor"
+            @click="viewRow(scope.row)"
+            title="查看"
           >
           </i>
+          <el-popconfirm title="确定删除吗?" @confirm="delRow(scope.row)">
+            <i slot="reference" class="el-icon-delete elIcon" title="删除"> </i>
+          </el-popconfirm>
         </template>
       </el-table-column>
     </tableList>
@@ -203,7 +288,6 @@
       width="690px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
-      :before-close="diaClose"
     >
       <div class="videoBox">
         <video autoplay :src="videoSrc" controls></video>
@@ -216,7 +300,6 @@
       width="780px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
-      :before-close="diaClose"
     >
       <el-form
         ref="editInfo"
@@ -277,14 +360,24 @@ export default {
     return {
       activeName: '2',
       searchParams: {
-        //搜索参数
-        sceneId: '', // 场景编号
-        fileName: [], // 功能模块
-        scenarioRoadType: [], // 道路类型
-        scenarioResume: '', // 场景简述
+        sceneName: '', // 场景名称
         share: '0',
-        // scenarioWeather: [], // 天气
-        // scenarioTime: "", // 场景发生时刻
+        mainBehavior: [['mainBehavior', '']], // 主车动作
+        otherBehavior: [['otherBehavior', '']],
+        weather: [['weather', '']],
+        roadType: [['roadType', '']],
+        roadGeometryPlane: [['roadGeometryPlane', '']],
+        roadGeometryVertical: [['roadGeometryVertical', '']],
+        autoDriveFunction: [['autoDriveFunction', '']],
+        operationArea: [['operationArea', '']],
+        minComplexity: '',
+        maxComplexity: '',
+        minRisk: '',
+        maxRisk: '',
+        complexityLevel: '',
+        riskLevel: '',
+        sceneDescription: '',
+        label: '',
       },
       //  编辑信息
       editVisible: false,
@@ -388,42 +481,9 @@ export default {
         layout: 'sizes, total, prev, pager, next, jumper',
       },
       getDataWay: {
-        //加载表格数据
-        dataType: 'data',
+        dataType: 'url',
         type: 'post',
-        // firstRequest: false,
-        data: [
-          {
-            currentPage: 1,
-            pageSize: 10,
-            referenceId: 'd9b47f77cb8d4b13940dd74eef1c0d59',
-            referenceName: 'mountain_frontcar',
-            mainBehavior: '汇入',
-            otherBehavior: '直行',
-            weather: '晴',
-            sceneName: '20240126',
-            roadGeometryPlane: '直道',
-            roadGeometryVertical: '上坡',
-            autoDriveFunction: 'ACC',
-            lable: '标签',
-            referenceDescription: '场景描述',
-            complexity: 1,
-            risk: 1,
-            complexityLevel: 11,
-            riskLevel: 11,
-            videoAddress:
-              '基准场景库/20221125/1669366123893/Scenarios/mountain/simulation.mp4',
-            osgbAddress: '基准场景库/20221125/1669366123893/OSGB/0518.osgb',
-            xodrAddress: '基准场景库/20221125/1669366123893/XODR/0518.xodr',
-            xoscAddress:
-              '基准场景库/20221125/1669366123893/Scenarios/mountain/mountain_frontcar.xml',
-            jsonAddress:
-              '基准场景库/20221125/1669366123893/Scenarios/mountain/mountain_frontcar.json',
-            videoPreview: null,
-            label: null,
-            maxTime: '20',
-          },
-        ],
+        data: this.$api.sceneLibrary.querybenchmarkList,
         param: {
           share: '0',
         },
@@ -447,8 +507,26 @@ export default {
 
   methods: {
     doSearch() {
-      this.searchParams.share = this.activeName === '1' ? '1' : '0'
-      this.refreshList(this.searchParams)
+      this.searchParams.share = '0'
+      const specialParams = [
+        'mainBehavior',
+        'otherBehavior',
+        'weather',
+        'roadType',
+        'roadGeometryPlane',
+        'roadGeometryVertical',
+        'autoDriveFunction',
+        'operationArea',
+      ]
+      const obj = JSON.parse(JSON.stringify(this.searchParams))
+      Object.keys(obj).forEach((item) => {
+        if (specialParams.includes(item)) {
+          if (!obj[item][0][1]) {
+            obj[item] = []
+          }
+        }
+      })
+      this.refreshList(obj)
     },
     //刷新table
     refreshList(param) {
@@ -472,11 +550,25 @@ export default {
       this.activeName = data.name
       this.doSearch()
     },
+    // 观看视频
     viewRow(row) {
       this.dialogVisible = true
-      //   this.generalizationId = row.id
-      //   this.generalizationDiaTitle = '泛化模板- ' + (row.sceneId || '')
-      //   this.generalizationVisible = true
+      this.videoSrc = 'https://media.w3.org/2010/05/sintel/trailer.mp4'
+    },
+    // 删除列表
+    delRow(e) {
+      this.$axios({
+        method: 'post',
+        url: this.$api.sceneLibrary.batchDeleteSceneReference,
+        data: { sceneNames: [e.sceneName] },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.doSearch()
+          this.$message.success('删除成功')
+        } else {
+          this.$message.error(res.message || '删除失败')
+        }
+      })
     },
     // 编辑
     editHandle() {
@@ -489,70 +581,38 @@ export default {
         // query: this.activeName == '3' ? { isScore: true } : {}, // 评分规则新增路由跳转标识
       })
     },
-    getFileNameList() {
-      this.$axios({
-        method: 'post',
-        url: this.$api.sceneLibrary.queryType,
-        data: {},
-      }).then((res) => {
-        if (res.code == 200 && res.info) {
-          let arr = []
-          res.info.forEach((item, i) => {
-            arr[i] = {
-              code: item,
-              caption: item,
-            }
-          })
-          this.fileNameList = arr
-        } else {
-          this.$message.error(res.message || '获取功能模块列表失败')
-        }
-      })
-    },
-    // 泛化-取消
-    generalizationCancel() {
-      this.generalizationVisible = false
-    },
     delRows() {
       let checkedArr = this.checkedArr
-
       if (checkedArr.length <= 0) {
         this.$message.info('请先选择数据')
         return
+      } else {
+        const obj = []
+        checkedArr.forEach(item=>{
+          obj.push(item.sceneName)
+        })
+        this.$axios({
+          method: 'post',
+          url: this.$api.sceneLibrary.batchDeleteSceneReference,
+          data: { sceneNames: obj },
+        }).then((res) => {
+          if (res.code == 200) {
+            this.doSearch()
+            this.$message.success('删除成功')
+          } else {
+            this.$message.error(res.message || '删除失败')
+          }
+        })
       }
-
-      // let arr = checkedArr.map((i) => i.naturalName);
-
-      // this.$confirm("确认是否批量删除?", "提示", {
-      //     confirmButtonText: "确定",
-      //     cancelButtonText: "取消",
-      //     type: "warning",
-      // }).then(() => {
-      //     this.$axios({
-      //         method: "post",
-      //         url: this.$api.sceneLibrary.batchDeleteSceneNatural,
-      //         data: {
-      //             naturalNameList: arr,
-      //         },
-      //     }).then((res) => {
-      //         if (res.code == 200) {
-      //             this.$message.success("删除成功");
-      //         } else {
-      //             this.$message.error(res.message || "删除失败");
-      //         }
-      //         this.doSearch();
-      //     });
-      // });
     },
   },
 
   async mounted() {
-    await this.$dicsListsInit({
-      // scenarioWeatherList: "scenarioWeather",
-      scenarioRoadTypeList: 'scenarioRoadType',
-    })
-
-    this.getFileNameList()
+    // await this.$dicsListsInit({
+    //   // scenarioWeatherList: "scenarioWeather",
+    //   scenarioRoadTypeList: 'scenarioRoadType',
+    // })
+    // this.getFileNameList()
   },
 }
 </script>

+ 0 - 82
src/views/systemManagement/sceneLibraryManagement/generalizationScene.vue

@@ -27,88 +27,6 @@
                     @keyup.enter.native="doSearch">
                 </el-input>
             </template>
-                         <!-- 复杂度 -->
-      <template slot="searchItem6">
-        <span class="label">复杂度</span>
-        <el-input
-          v-model="searchParams.a"
-          size="small"
-          clearable
-          placeholder="请输入"
-          maxlength="60"
-          @keyup.enter.native="doSearch"
-          style="width: 100px"
-        >
-        </el-input>
-        <span class="dateSeparator">至</span>
-        <el-input
-          v-model="searchParams.b"
-          size="small"
-          clearable
-          placeholder="请输入"
-          maxlength="60"
-          @keyup.enter.native="doSearch"
-          style="width: 100px"
-        >
-        </el-input>
-      </template>
-      <!-- 危险度 -->
-      <template slot="searchItem6">
-        <span class="label">危险度</span>
-        <el-input
-          v-model="searchParams.a"
-          size="small"
-          clearable
-          placeholder="请输入"
-          maxlength="60"
-          @keyup.enter.native="doSearch"
-          style="width: 100px"
-        >
-        </el-input>
-        <span class="dateSeparator">至</span>
-        <el-input
-          v-model="searchParams.b"
-          size="small"
-          clearable
-          placeholder="请输入"
-          maxlength="60"
-          @keyup.enter.native="doSearch"
-          style="width: 100px"
-        >
-        </el-input>
-      </template>
-      <template slot="searchItem8">
-        <span class="label">复杂度等级</span>
-        <el-select
-          v-model="searchParams.scenarioRoadType"
-          multiple
-          size="small"
-          clearable
-        >
-          <el-option
-            v-for="item in scenarioRoadTypeList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
-          ></el-option>
-        </el-select>
-      </template>
-      <template slot="searchItem8">
-        <span class="label">危险度等级</span>
-        <el-select
-          v-model="searchParams.scenarioRoadType"
-          multiple
-          size="small"
-          clearable
-        >
-          <el-option
-            v-for="item in scenarioRoadTypeList"
-            :label="item.caption"
-            :value="item.code"
-            :key="item.code"
-          ></el-option>
-        </el-select>
-      </template>
             <template slot="searchBtn1">
                 <el-button type="primary" @click="doSearch">查询</el-button>
             </template>

+ 23 - 22
src/views/systemManagement/sceneUploadList.vue

@@ -141,9 +141,9 @@
         <el-form-item
           v-if="form.sceneType != '4'"
           label="复杂度评价脚本:"
-          prop="script"
+          prop="sceneEvaluationRuleId"
         >
-          <el-select placeholder="请选择" v-model="form.script">
+          <el-select placeholder="暂不评价" v-model="form.sceneEvaluationRuleId" >
             <el-option
               v-for="item in scriptOptions"
               :key="item.value"
@@ -291,7 +291,7 @@ export default {
         sceneType: '', // 场景分类
         dataDirectory: '', // 场景路径
         fileName: '', // 文件名称
-        script: '', // 复杂度评价脚本
+        sceneEvaluationRuleId: '', // 复杂度评价脚本
       },
       rules: {
         name: [{ required: true, message: '请输入', trigger: 'blur' }],
@@ -306,24 +306,7 @@ export default {
       errorMessage: '',
       timer: null,
       //   测试mock数据
-      scriptOptions: [
-        {
-          label: '暂不评价',
-          value: 0,
-        },
-        {
-          label: '复杂度A',
-          value: 1,
-        },
-        {
-          label: '复杂度B',
-          value: 2,
-        },
-        {
-          label: '复杂度C',
-          value: 3,
-        },
-      ],
+      scriptOptions: [],
     }
   },
 
@@ -390,7 +373,7 @@ export default {
         sceneType: '', // 场景类型
         dataDirectory: '', // 场景路径
         fileName: '', // 文件上传
-        script: 0, // 复杂度评价脚本
+        sceneEvaluationRuleId: '', // 复杂度评价脚本
       }
       this.file = null
 
@@ -399,7 +382,25 @@ export default {
       this.$nextTick(() => {
         this.$refs.form.clearValidate()
       })
+      this.getScriptList()
+    },
+    // 获取脚本列表
+    getScriptList(){
+     this.$axios({
+        method: 'post',
+        url: this.$api.sceneLibrary.getScriptListByType,
+        data: {
+          sceneEvaluationType: ["1"]},
+      }).then(res=>{
+        const arr = (res.info[1] || []).map(item=>{
+          item.label = item.scriptName
+          item.value = item.ruleId
+          return item
+        })
+        this.scriptOptions = [...arr]
+      })
     },
+
     viewRow(errorMessage) {
       this.errorMessage = errorMessage
       this.errRocordVisible = true

+ 533 - 442
src/views/workManagement/manualRunProjectDetail.vue

@@ -1,25 +1,50 @@
 <template>
-    <div>
-        <el-form ref="form" :model="form" :rules="rules" label-width="135px" class="flexBox">
-            <div class="formItemBox">
-                <el-form-item label="项目名称:" prop="projectName">
-                    <el-input placeholder="请输入" maxlength="120" v-autoTrim="{ obj: form, key: 'projectName' }"
-                        v-model="form.projectName">
-                    </el-input>
-                </el-form-item>
-                <el-form-item label="项目描述:" prop="projectDescribe">
-                    <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4 }" placeholder="请输入" maxlength="300"
-                        v-autoTrim="{ obj: form, key: 'projectDescribe' }" v-model="form.projectDescribe">
-                    </el-input>
-                </el-form-item>
-                <el-form-item label="算法来源:" prop="algorithmType">
-                    <el-radio v-model="form.algorithmType" label="1" @change="typeChange">私有导入</el-radio>
-                    <el-radio v-model="form.algorithmType" label="3" @change="typeChange">算法平台</el-radio>
-                </el-form-item>
-                <el-form-item label="选择算法:" prop="algorithmArrayS">
-                    <el-cascader ref="cascaderA" v-model="form.algorithmArrayS" :options="algorithmList" :props="props"
-                        @change="algorithmSelChange"></el-cascader>
-                    <!-- <el-select v-model="form.algorithm">
+  <div>
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      label-width="135px"
+      class="flexBox"
+    >
+      <div class="formItemBox">
+        <el-form-item label="项目名称:" prop="projectName">
+          <el-input
+            placeholder="请输入"
+            maxlength="120"
+            v-autoTrim="{ obj: form, key: 'projectName' }"
+            v-model="form.projectName"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="项目描述:" prop="projectDescribe">
+          <el-input
+            type="textarea"
+            :autosize="{ minRows: 4, maxRows: 4 }"
+            placeholder="请输入"
+            maxlength="300"
+            v-autoTrim="{ obj: form, key: 'projectDescribe' }"
+            v-model="form.projectDescribe"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="算法来源:" prop="algorithmType">
+          <el-radio v-model="form.algorithmType" label="1" @change="typeChange"
+            >私有导入</el-radio
+          >
+          <el-radio v-model="form.algorithmType" label="3" @change="typeChange"
+            >算法平台</el-radio
+          >
+        </el-form-item>
+        <el-form-item label="选择算法:" prop="algorithmArrayS">
+          <el-cascader
+            ref="cascaderA"
+            v-model="form.algorithmArrayS"
+            :options="algorithmList"
+            :props="props"
+            @change="algorithmSelChange"
+          ></el-cascader>
+          <!-- <el-select v-model="form.algorithm">
                         <el-option
                             v-for="item in algorithmList"
                             :label="item.name"
@@ -28,11 +53,16 @@
                             :title="item.description"
                         ></el-option>
                     </el-select> -->
-                </el-form-item>
-                <el-form-item label="选择车辆:" prop="vehicleArrayS">
-                    <el-cascader ref="cascaderB" v-model="form.vehicleArrayS" :options="vehicleList" :props="props"
-                        @change="vehicleSelChange"></el-cascader>
-                    <!-- <el-select
+        </el-form-item>
+        <el-form-item label="选择车辆:" prop="vehicleArrayS">
+          <el-cascader
+            ref="cascaderB"
+            v-model="form.vehicleArrayS"
+            :options="vehicleList"
+            :props="props"
+            @change="vehicleSelChange"
+          ></el-cascader>
+          <!-- <el-select
                         v-model="form.vehicle"
                         @change="vehicleSelChange"
                     >
@@ -44,11 +74,16 @@
                             :title="item.description"
                         ></el-option>
                     </el-select> -->
-                </el-form-item>
-                <el-form-item label="选择场景:" prop="sceneArrayS">
-                    <el-cascader ref="cascaderC" v-model="form.sceneArrayS" :options="sceneList" :props="props"
-                        @change="sceneSelChange"></el-cascader>
-                    <!-- <el-select v-model="form.scene" @change="sceneSelChange">
+        </el-form-item>
+        <el-form-item label="选择场景:" prop="sceneArrayS">
+          <el-cascader
+            ref="cascaderC"
+            v-model="form.sceneArrayS"
+            :options="sceneList"
+            :props="props"
+            @change="sceneSelChange"
+          ></el-cascader>
+          <!-- <el-select v-model="form.scene" @change="sceneSelChange">
                         <el-option
                             v-for="item in sceneList"
                             :label="item.name"
@@ -56,452 +91,508 @@
                             :key="item.id"
                         ></el-option>
                     </el-select> -->
-                </el-form-item>
-                <el-form-item label="并行度:" prop="parallelism">
-                    <el-input :disabled="runDisabled" placeholder="请输入" maxlength="10"
-                        v-autoTrim="{ obj: form, key: 'parallelism' }" v-model="form.parallelism">
-                    </el-input>
-                </el-form-item>
-                <el-form-item label="场景评价规则:"  ></el-form-item>
-                    <el-form-item label="危险度" class="rule-item">
-                        <el-select>
-                            <el-option label="暂不评价"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="复杂度" class="rule-item">
-                        <el-select>
-                            <el-option label="暂不评价"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="暴露率" class="rule-item">
-                        <el-select>
-                            <el-option label="暂不评价" class="rule-item"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="覆盖率" class="rule-item">
-                        <el-select>
-                            <el-option label="暂不评价"></el-option>
-                        </el-select>
-                    </el-form-item>
-                <el-form-item label="最大仿真时间(s):" prop="maxSimulationTime">
-                    <el-input placeholder="请输入" maxlength="10" v-autoTrim="{ obj: form, key: 'maxSimulationTime' }"
-                        v-model="form.maxSimulationTime">
-                    </el-input>
-                </el-form-item>
-                <el-form-item label="是否选择GPU:" prop="isChoiceGpu">
-                    <el-radio v-model="form.isChoiceGpu" label="0">是</el-radio>
-                    <el-radio v-model="form.isChoiceGpu" label="1">否</el-radio>
-                </el-form-item>
-            </div>
-
-            <div class="tipBox">
-                <div class="tip tipA">
-                    <!-- (传感器1:根据车辆自动带出;传感器2:根据车辆自动带出) -->
-                    <span v-for="item in sensors" :key="item" v-bind:class="{
-                        iconA: item === 'camera',
-                        iconB: item === 'ogt',
-                        iconC: item === 'lidar',
-                        iconE: item === 'gps',
-                    }"></span>
-                </div>
-                <div class="tip">(场景数量:{{ sceneCount }})</div>
-                <div class="tip">(最多可用资源:{{ maxCount }})</div>
-                <div class="tip">(最小是5,最大是600)</div>
-            </div>
-        </el-form>
-        <div class="btns">
-            <el-button type="primary" @click="save(false)">保存</el-button>
-            <el-button type="primary" @click="save(true)" v-if="this.$route.query.id">另存为</el-button>
-            <el-button type="primary" @click="save(false, true)" :disabled="runDisabled">提交</el-button>
-            <el-button type="primary" plain @click="cancel">取消</el-button>
+        </el-form-item>
+        <el-form-item label="并行度:" prop="parallelism">
+          <el-input
+            :disabled="runDisabled"
+            placeholder="请输入"
+            maxlength="10"
+            v-autoTrim="{ obj: form, key: 'parallelism' }"
+            v-model="form.parallelism"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="场景评价规则:"></el-form-item>
+        <el-form-item label="危险度" class="rule-item" prop="riskEvaluationRule">
+          <el-select placeholder="暂不评价" v-model="form.riskEvaluationRule">
+            <el-option
+              v-for="(item, idx) in scriptList['2']"
+              :key="idx"
+              :label="item.ruleName"
+              :value="item.ruleId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="复杂度" class="rule-item" prop="complexityEvaluationRule">
+          <el-select placeholder="暂不评价" v-model="form.complexityEvaluationRule">
+            <el-option
+              v-for="(item, idx) in scriptList['1']"
+              :key="idx"
+              :label="item.ruleName"
+              :value="item.ruleId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="暴露率" class="rule-item" prop="exposureRateEvaluationRule">
+          <el-select placeholder="暂不评价" v-model="form.exposureRateEvaluationRule">
+            <el-option
+              v-for="(item, idx) in scriptList['3']"
+              :key="idx"
+              :label="item.ruleName"
+              :value="item.ruleId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="覆盖率" class="rule-item" prop="coverageRateEvaluationRule">
+          <el-select placeholder="暂不评价" v-model="form.coverageRateEvaluationRule">
+            <el-option
+              v-for="(item, idx) in scriptList['4']"
+              :key="idx"
+              :label="item.ruleName"
+              :value="item.ruleId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="最大仿真时间(s):" prop="maxSimulationTime">
+          <el-input
+            placeholder="请输入"
+            maxlength="10"
+            v-autoTrim="{ obj: form, key: 'maxSimulationTime' }"
+            v-model="form.maxSimulationTime"
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="是否选择GPU:" prop="isChoiceGpu">
+          <el-radio v-model="form.isChoiceGpu" label="0">是</el-radio>
+          <el-radio v-model="form.isChoiceGpu" label="1">否</el-radio>
+        </el-form-item>
+      </div>
+
+      <div class="tipBox">
+        <div class="tip tipA">
+          <!-- (传感器1:根据车辆自动带出;传感器2:根据车辆自动带出) -->
+          <span
+            v-for="item in sensors"
+            :key="item"
+            v-bind:class="{
+              iconA: item === 'camera',
+              iconB: item === 'ogt',
+              iconC: item === 'lidar',
+              iconE: item === 'gps',
+            }"
+          ></span>
         </div>
+        <div class="tip">(场景数量:{{ sceneCount }})</div>
+        <div class="tip">(最多可用资源:{{ maxCount }})</div>
+        <div class="tip">(最小是5,最大是600)</div>
+      </div>
+    </el-form>
+    <div class="btns">
+      <el-button type="primary" @click="save(false)">保存</el-button>
+      <el-button type="primary" @click="save(true)" v-if="this.$route.query.id"
+        >另存为</el-button
+      >
+      <el-button
+        type="primary"
+        @click="save(false, true)"
+        :disabled="runDisabled"
+        >提交</el-button
+      >
+      <el-button type="primary" plain @click="cancel">取消</el-button>
     </div>
+  </div>
 </template>
 
 <script>
 //import  from '';
-let maxCount = 0; // 用于校验
+let maxCount = 0 // 用于校验
 let validateNum = (rule, value, callback) => {
-    !/^(\d+)$/.test(value) && callback(new Error(rule.message));
-    if (+value <= 0 || +value > +maxCount) callback(new Error(rule.message));
-    callback();
-};
+  !/^(\d+)$/.test(value) && callback(new Error(rule.message))
+  if (+value <= 0 || +value > +maxCount) callback(new Error(rule.message))
+  callback()
+}
 let validateNumA = (rule, value, callback) => {
-    !/^(\d+)$/.test(value) && callback(new Error(rule.message));
-    if (+value < 5 || +value > 600) callback(new Error(rule.message));
-    callback();
-};
+  !/^(\d+)$/.test(value) && callback(new Error(rule.message))
+  if (+value < 5 || +value > 600) callback(new Error(rule.message))
+  callback()
+}
 let validateNumB = (rule, value, callback) => {
-    !/^(\d+)$/.test(value) && callback(new Error(rule.message));
-    if (+value <= 0) callback(new Error(rule.message));
-    callback();
-};
+  !/^(\d+)$/.test(value) && callback(new Error(rule.message))
+  if (+value <= 0) callback(new Error(rule.message))
+  callback()
+}
 
 export default {
-    name: "manualRunProjectDetail", // 标准化测试详情
-    components: {},
-    data() {
-        return {
-            form: {
-                id: "",
-                projectName: "", // 项目名称
-                projectDescribe: "", // 项目描述
-                algorithmType: "1", // 算法来源
-                algorithm: "", // 选择算法
-                algorithmArrayS: "", // 选择算法
-                vehicle: "", // 选择车辆
-                vehicleArrayS: "", // 选择车辆
-                scene: "", // 选择场景
-                sceneArrayS: "", // 选择场景
-                parallelism: "", // 并行度
-                maxSimulationTime: "", // 最大仿真时间
-                isChoiceGpu: "0", // 是否选择GPU
-                nowRunState: "10", // 运行状态
-            },
-            algorithmList: [], // 算法对应列表
-            vehicleList: [], // 车辆对应列表
-            sceneList: [], // 场景对应列表
-            maxCount: 0, // 最多可用资源
-            sceneCount: 0, // 场景数量
-            rules: {
-                projectName: [
-                    { required: true, message: "请输入", trigger: "blur" },
-                ],
-                projectDescribe: [
-                    { required: true, message: "请输入", trigger: "blur" },
-                ],
-                algorithmType: [
-                    { required: true, message: "请选择", trigger: "change" },
-                ],
-                algorithmArrayS: [
-                    { required: true, message: "请选择", trigger: "change" },
-                ],
-                vehicleArrayS: [
-                    { required: true, message: "请选择", trigger: "change" },
-                ],
-                sceneArrayS: [
-                    { required: true, message: "请选择", trigger: "change" },
-                ],
-                parallelism: [
-                    { required: true, message: "请输入", trigger: "blur" },
-                    // {
-                    //     validator: validateNum,
-                    //     message: "请输入不大于最多可用资源的正整数",
-                    //     trigger: ["blur"],
-                    // },
-                ],
-                maxSimulationTime: [
-                    { required: true, message: "请输入", trigger: "blur" },
-                    {
-                        validator: validateNumA,
-                        message: "请输入不小于5且不大于600的正整数",
-                        trigger: ["blur"],
-                    },
-                ],
-                isChoiceGpu: [
-                    { required: true, message: "请选择", trigger: "change" },
-                ],
-            },
-            sensors: [], // 选中车辆后对应的传感器数组
-            runDisabled: false, // 若最多可用资源为0,则不可点击"提交"
-            props: {
-                multiple: false,
-                label: "name",
-                value: "code",
-            },
-        };
-    },
-
-    computed: {},
-
-    methods: {
-        async getLists(dropDownType = "") {
-            await this.$axios({
-                method: "post",
-                url: this.$api.workManagement.selectDropDownByTypeNew,
-                data: {
-                    dropDownType,
-                    algorithmType: this.form.algorithmType,
-                },
-            }).then((res) => {
-                if (res.code == 200 && res.info) {
-                    res.info.forEach((item) => {
-                        if (item.type === "1") {
-                            // item.dropDownList.forEach((i) => {
-                            //     if (i.share === "1") i.name = i.name + "(公有)";
-                            // });
-
-                            this.algorithmList = item.dropDownList;
-                        } else if (item.type === "2") {
-                            // item.dropDownList.forEach((i) => {
-                            //     if (i.share === "1") i.name = i.name + "(公有)";
-                            // });
-
-                            this.vehicleList = item.dropDownList;
-                        } else if (item.type === "3") {
-                            // item.dropDownList.forEach((i) => {
-                            //     if (i.share === "1") i.name = i.name + "(公有)";
-                            // });
-
-                            this.sceneList = item.dropDownList;
-                        }
-                        // 空表示第一次进,有值表示在切换算法来源,需要清空选择算法的值
-                        if (dropDownType) {
-                            this.form.algorithm = "";
-                            this.form.algorithmArrayS = [];
-                            this.$nextTick(() => {
-                                // this.$refs.form.clearValidate("algorithm");
-                                this.$refs.form.clearValidate("algorithmArrayS");
-                            });
-                        }
-                    });
-                } else {
-                    this.$message.error(res.message || "获取信息失败");
-                }
-            });
-        },
-        typeChange() {
-            this.getLists("1");
-        },
-        async getMaxSimulationTime() {
-            await this.$axios({
-                method: "post",
-                url: this.$api.workManagement.selectMaxParallelism,
-                data: {},
-            }).then((res) => {
-                if (res.code == 200 && res.info && res.info != 0) {
-                    this.maxCount = maxCount = res.info;
-                    if (res.info == -1) {
-                        this.rules.parallelism.push({
-                            validator: validateNumB,
-                            message: "请输入正整数",
-                            trigger: ["blur"],
-                        });
-                    } else {
-                        this.rules.parallelism.push({
-                            validator: validateNum,
-                            message: "请输入不大于最多可用资源的正整数",
-                            trigger: ["blur"],
-                        });
-                    }
-                } else if (res.code == 200 && res.info == 0) {
-                    this.maxCount = maxCount = 0;
-                    this.runDisabled = true;
-                    this.form.parallelism = 0;
-                } else {
-                    this.$message.error(res.message || "获取信息失败");
-                }
-            });
-        },
-        algorithmSelChange(v) {
-            // console.log(v);
-            // console.log(this.$refs.cascaderA.getCheckedNodes(true)[0].data.vo);
-            let item = this.$refs.cascaderA.getCheckedNodes(true)[0].data.vo;
-            this.form.algorithm = item.id;
+  name: 'manualRunProjectDetail', // 标准化测试详情
+  components: {},
+  data() {
+    return {
+      form: {
+        id: '',
+        projectName: '', // 项目名称
+        projectDescribe: '', // 项目描述
+        algorithmType: '1', // 算法来源
+        algorithm: '', // 选择算法
+        algorithmArrayS: '', // 选择算法
+        vehicle: '', // 选择车辆
+        vehicleArrayS: '', // 选择车辆
+        scene: '', // 选择场景
+        sceneArrayS: '', // 选择场景
+        parallelism: '', // 并行度
+        maxSimulationTime: '', // 最大仿真时间
+        isChoiceGpu: '0', // 是否选择GPU
+        nowRunState: '10', // 运行状态
+        complexityEvaluationRule: '', // 复杂度
+        riskEvaluationRule: '', // 危险度
+        exposureRateEvaluationRule: '', // 暴露率
+        coverageRateEvaluationRule: '', // 覆盖率
+      },
+      algorithmList: [], // 算法对应列表
+      vehicleList: [], // 车辆对应列表
+      sceneList: [], // 场景对应列表
+      maxCount: 0, // 最多可用资源
+      sceneCount: 0, // 场景数量
+      scriptList: {}, // 评价脚本列表
+      rules: {
+        projectName: [{ required: true, message: '请输入', trigger: 'blur' }],
+        projectDescribe: [
+          { required: true, message: '请输入', trigger: 'blur' },
+        ],
+        algorithmType: [
+          { required: true, message: '请选择', trigger: 'change' },
+        ],
+        algorithmArrayS: [
+          { required: true, message: '请选择', trigger: 'change' },
+        ],
+        vehicleArrayS: [
+          { required: true, message: '请选择', trigger: 'change' },
+        ],
+        sceneArrayS: [{ required: true, message: '请选择', trigger: 'change' }],
+        parallelism: [
+          { required: true, message: '请输入', trigger: 'blur' },
+          // {
+          //     validator: validateNum,
+          //     message: "请输入不大于最多可用资源的正整数",
+          //     trigger: ["blur"],
+          // },
+        ],
+        maxSimulationTime: [
+          { required: true, message: '请输入', trigger: 'blur' },
+          {
+            validator: validateNumA,
+            message: '请输入不小于5且不大于600的正整数',
+            trigger: ['blur'],
+          },
+        ],
+        isChoiceGpu: [{ required: true, message: '请选择', trigger: 'change' }],
+      },
+      sensors: [], // 选中车辆后对应的传感器数组
+      runDisabled: false, // 若最多可用资源为0,则不可点击"提交"
+      props: {
+        multiple: false,
+        label: 'name',
+        value: 'code',
+      },
+    }
+  },
+
+  computed: {},
+
+  methods: {
+    async getLists(dropDownType = '') {
+      await this.$axios({
+        method: 'post',
+        url: this.$api.workManagement.selectDropDownByTypeNew,
+        data: {
+          dropDownType,
+          algorithmType: this.form.algorithmType,
         },
-        vehicleSelChange(v) {
-            let item = this.$refs.cascaderB.getCheckedNodes(true)[0].data.vo;
-            this.form.vehicle = item.id;
-
-            let sensor = item.sensor;
-            if (!sensor) {
-                this.sensors = [];
-            } else {
-                this.sensors = sensor.split(",");
+      }).then((res) => {
+        if (res.code == 200 && res.info) {
+          res.info.forEach((item) => {
+            if (item.type === '1') {
+              // item.dropDownList.forEach((i) => {
+              //     if (i.share === "1") i.name = i.name + "(公有)";
+              // });
+
+              this.algorithmList = item.dropDownList
+            } else if (item.type === '2') {
+              // item.dropDownList.forEach((i) => {
+              //     if (i.share === "1") i.name = i.name + "(公有)";
+              // });
+
+              this.vehicleList = item.dropDownList
+            } else if (item.type === '3') {
+              // item.dropDownList.forEach((i) => {
+              //     if (i.share === "1") i.name = i.name + "(公有)";
+              // });
+
+              this.sceneList = item.dropDownList
             }
-
-            // let sensor = this.vehicleList.find((i) => i.id === item).sensor;
-
-            // if (!sensor) {
-            //     this.sensors = [];
-            // } else {
-            //     this.sensors = sensor.split(",");
-            // }
-        },
-        sceneSelChange(v) {
-            let item = this.$refs.cascaderC.getCheckedNodes(true)[0].data.vo;
-            this.form.scene = item.id;
-            this.sceneCount = item.sceneNum
-
-            // this.sceneCount = this.sceneList.find(
-            //     (i) => i.id === item
-            // ).sceneNum;
-        },
-        save(isAdd = false, needChange = false) {
-            // isAdd是否强制新增,needChange是否需要改变状态
-            this.$refs.form.validate((valid) => {
-                if (valid) {
-                    if (isAdd) {
-                        // 另存为
-                        this.form.id = "";
-                    }
-
-                    this.form.nowRunState = "10";
-
-                    this.$axios({
-                        method: "post",
-                        url: this.$api.workManagement.addOrUpdateProject,
-                        data: {
-                            ...this.form,
-                        },
-                    }).then((res) => {
-                        if (res.code == 200) {
-                            this.$message.success("保存成功");
-                            if (needChange) {
-                                this.form.id = res.info;
-                                this.stateChange();
-                            } else {
-                                this.cancel();
-                            }
-                        } else {
-                            this.$message.error(res.message || "保存失败");
-                        }
-                    });
-                }
-            });
-        },
-        cancel() {
-            this.$router.replace({ path: "/manualRunProjectList" });
-        },
-        stateChange() {
-            this.$axios({
-                method: "post",
-                url: this.$api.workManagement.updateProjectNowRunState,
-                data: {
-                    id: this.form.id,
-                    nowRunState: "20",
-                },
-            }).then((res) => {
-                if (res.code == 200) {
-                    this.$message.success("提交成功");
-                    this.cancel();
-                } else {
-                    this.$message.error(res.message || "提交失败");
-                }
-            });
+            // 空表示第一次进,有值表示在切换算法来源,需要清空选择算法的值
+            if (dropDownType) {
+              this.form.algorithm = ''
+              this.form.algorithmArrayS = []
+              this.$nextTick(() => {
+                // this.$refs.form.clearValidate("algorithm");
+                this.$refs.form.clearValidate('algorithmArrayS')
+              })
+            }
+          })
+        } else {
+          this.$message.error(res.message || '获取信息失败')
+        }
+      })
+    },
+    typeChange() {
+      this.getLists('1')
+    },
+    async getMaxSimulationTime() {
+      await this.$axios({
+        method: 'post',
+        url: this.$api.workManagement.selectMaxParallelism,
+        data: {},
+      }).then((res) => {
+        if (res.code == 200 && res.info && res.info != 0) {
+          this.maxCount = maxCount = res.info
+          if (res.info == -1) {
+            this.rules.parallelism.push({
+              validator: validateNumB,
+              message: '请输入正整数',
+              trigger: ['blur'],
+            })
+          } else {
+            this.rules.parallelism.push({
+              validator: validateNum,
+              message: '请输入不大于最多可用资源的正整数',
+              trigger: ['blur'],
+            })
+          }
+        } else if (res.code == 200 && res.info == 0) {
+          this.maxCount = maxCount = 0
+          this.runDisabled = true
+          this.form.parallelism = 0
+        } else {
+          this.$message.error(res.message || '获取信息失败')
+        }
+      })
+    },
+    algorithmSelChange(v) {
+      // console.log(v);
+      // console.log(this.$refs.cascaderA.getCheckedNodes(true)[0].data.vo);
+      let item = this.$refs.cascaderA.getCheckedNodes(true)[0].data.vo
+      this.form.algorithm = item.id
+    },
+    vehicleSelChange(v) {
+      let item = this.$refs.cascaderB.getCheckedNodes(true)[0].data.vo
+      this.form.vehicle = item.id
+
+      let sensor = item.sensor
+      if (!sensor) {
+        this.sensors = []
+      } else {
+        this.sensors = sensor.split(',')
+      }
+
+      // let sensor = this.vehicleList.find((i) => i.id === item).sensor;
+
+      // if (!sensor) {
+      //     this.sensors = [];
+      // } else {
+      //     this.sensors = sensor.split(",");
+      // }
+    },
+    sceneSelChange(v) {
+      let item = this.$refs.cascaderC.getCheckedNodes(true)[0].data.vo
+      this.form.scene = item.id
+      this.sceneCount = item.sceneNum
+
+      // this.sceneCount = this.sceneList.find(
+      //     (i) => i.id === item
+      // ).sceneNum;
+    },
+    getScriptList() {
+      this.$axios({
+        method: 'post',
+        url: this.$api.sceneLibrary.getScriptListByType,
+        data: {
+          sceneEvaluationType: ['1', '2', '3', '4'],
         },
+      }).then((res) => {
+        this.scriptList = res.info
+      })
     },
-
-    mounted() {
-        if (this.$route.query.id) {
-            let id = "";
-            this.form.id = id = this.$route.query.id;
-
-            if (id) {
-                this.$axios({
-                    method: "post",
-                    url: this.$api.workManagement.selectProjectById,
-                    data: {
-                        id,
-                    },
-                }).then(async (res) => {
-                    if (res.code == 200 && res.info) {
-                        this.form = res.info;
-                        await this.getLists();
-                        await this.getMaxSimulationTime();
-                        this.vehicleSelChange(res.info.vehicle);
-                        this.sceneSelChange(res.info.scene);
-                    } else {
-                        this.$message.error(res.message || "获取信息失败");
-                    }
-                });
+    save(isAdd = false, needChange = false) {
+      // isAdd是否强制新增,needChange是否需要改变状态
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          if (isAdd) {
+            // 另存为
+            this.form.id = ''
+          }
+
+          this.form.nowRunState = '10'
+
+          this.$axios({
+            method: 'post',
+            url: this.$api.workManagement.addOrUpdateProject,
+            data: {
+              ...this.form,
+            },
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success('保存成功')
+              if (needChange) {
+                this.form.id = res.info
+                this.stateChange()
+              } else {
+                this.cancel()
+              }
+            } else {
+              this.$message.error(res.message || '保存失败')
             }
+          })
+        }
+      })
+    },
+    cancel() {
+      this.$router.replace({ path: '/manualRunProjectList' })
+    },
+    stateChange() {
+      this.$axios({
+        method: 'post',
+        url: this.$api.workManagement.updateProjectNowRunState,
+        data: {
+          id: this.form.id,
+          nowRunState: '20',
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message.success('提交成功')
+          this.cancel()
         } else {
-            this.getLists();
-            this.getMaxSimulationTime();
+          this.$message.error(res.message || '提交失败')
         }
+      })
     },
-};
+  },
+
+  mounted() {
+    if (this.$route.query.id) {
+      let id = ''
+      this.form.id = id = this.$route.query.id
+
+      if (id) {
+        this.$axios({
+          method: 'post',
+          url: this.$api.workManagement.selectProjectById,
+          data: {
+            id,
+          },
+        }).then(async (res) => {
+          if (res.code == 200 && res.info) {
+            this.form = res.info
+            await this.getLists()
+            await this.getMaxSimulationTime()
+            this.vehicleSelChange(res.info.vehicle)
+            this.sceneSelChange(res.info.scene)
+          } else {
+            this.$message.error(res.message || '获取信息失败')
+          }
+        })
+      }
+    } else {
+      this.getLists()
+      this.getMaxSimulationTime()
+      this.getScriptList()
+    }
+  },
+}
 </script>
 
 <style lang='less' scoped>
 .el-form {
-    width: 60%;
-    min-width: 900px;
-    padding-top: 60px;
-    margin: 0 auto;
-
-    .formItemBox {
-        flex: 1;
-
-        /deep/ .el-input,
-        .el-select,
-        .el-cascader {
-            width: 100%;
-        }
-
-        .el-cascader {
-            height: 32px;
-            line-height: 32px;
-        }
+  width: 60%;
+  min-width: 900px;
+  padding-top: 60px;
+  margin: 0 auto;
+
+  .formItemBox {
+    flex: 1;
+
+    /deep/ .el-input,
+    .el-select,
+    .el-cascader {
+      width: 100%;
     }
 
-    .el-textarea {
-        height: 96px;
+    .el-cascader {
+      height: 32px;
+      line-height: 32px;
     }
+  }
 
-    .tipBox {
-        min-width: 270px;
-        margin-left: 20px;
-
-        .tip {
-            margin-bottom: 22px;
-            line-height: 32px;
-        }
-
-        .tipA {
-            height: 32px;
-            // 按54往上加
-            margin-top: 280px;
+  .el-textarea {
+    height: 96px;
+  }
 
-            .iconA {
-                background: url("../../assets/common/image/sensor/001.png") center no-repeat;
-                background-size: contain;
-            }
-
-            .iconB {
-                background: url("../../assets/common/image/sensor/002.png") center no-repeat;
-                background-size: contain;
-            }
-
-            .iconC {
-                background: url("../../assets/common/image/sensor/003.png") center no-repeat;
-                background-size: contain;
-            }
-
-            .iconD {
-                background: url("../../assets/common/image/sensor/004.png") center no-repeat;
-                background-size: contain;
-            }
+  .tipBox {
+    min-width: 270px;
+    margin-left: 20px;
 
-            .iconE {
-                background: url("../../assets/common/image/sensor/005.png") center no-repeat;
-                background-size: contain;
-            }
+    .tip {
+      margin-bottom: 22px;
+      line-height: 32px;
+    }
 
-            span {
-                display: inline-block;
-                width: 18px;
-                height: 18px;
-                margin-top: 7px;
-                margin-right: 6px;
-            }
-        }
+    .tipA {
+      height: 32px;
+      // 按54往上加
+      margin-top: 280px;
+
+      .iconA {
+        background: url('../../assets/common/image/sensor/001.png') center
+          no-repeat;
+        background-size: contain;
+      }
+
+      .iconB {
+        background: url('../../assets/common/image/sensor/002.png') center
+          no-repeat;
+        background-size: contain;
+      }
+
+      .iconC {
+        background: url('../../assets/common/image/sensor/003.png') center
+          no-repeat;
+        background-size: contain;
+      }
+
+      .iconD {
+        background: url('../../assets/common/image/sensor/004.png') center
+          no-repeat;
+        background-size: contain;
+      }
+
+      .iconE {
+        background: url('../../assets/common/image/sensor/005.png') center
+          no-repeat;
+        background-size: contain;
+      }
+
+      span {
+        display: inline-block;
+        width: 18px;
+        height: 18px;
+        margin-top: 7px;
+        margin-right: 6px;
+      }
+    }
 
-        .tipB {
-            padding-top: 54px;
-        }
+    .tipB {
+      padding-top: 54px;
+    }
 
-        .tipBtnBox {
-            margin-left: 20px;
-        }
+    .tipBtnBox {
+      margin-left: 20px;
     }
+  }
 }
-.rule-item{
-    margin-left: 60px;
+.rule-item {
+  margin-left: 60px;
 }
 .btns {
-    padding-top: 30px;
-    text-align: center;
+  padding-top: 30px;
+  text-align: center;
 }
 </style>