Quellcode durchsuchen

feat:添加规则类型&&标准化创建提问文案样式修改

linchengzhe vor 1 Jahr
Ursprung
Commit
c340d5366e

+ 45 - 28
src/views/sceneLibrary/gradingRulesList.vue

@@ -2,18 +2,6 @@
   <div>
     <div v-show="!$route.path.includes('gradingRuleDetail')">
       <search-layout :needBox="true">
-        <!-- <template slot="searchItem1">
-                              <span class="label">规则ID</span>
-                              <el-input
-                                  v-model="searchParams.rulesCode"
-                                  size="small"
-                                  clearable
-                                  placeholder="请输入"
-                                  maxlength="60"
-                                  @keyup.enter.native="doSearch"
-                              >
-                              </el-input>
-                          </template> -->
         <template slot="searchItem1">
           <span class="label">规则名称</span>
           <el-input
@@ -40,16 +28,6 @@
         </template>
         <template slot="searchItem3" v-if="activeName !== '3'">
           <span class="label">创建时间</span>
-          <!-- <el-date-picker
-                          v-model="searchDate"
-                          type="daterange"
-                          format="yyyy-MM-dd"
-                          value-format="yyyy-MM-dd"
-                          range-separator="至"
-                          start-placeholder="开始日期"
-                          end-placeholder="结束日期"
-                      >
-                      </el-date-picker> -->
           <el-date-picker
             v-model="searchParams.yearMin"
             type="date"
@@ -118,7 +96,7 @@
       <tableList
         ref="table"
         style="margin: 0 30px"
-        :columns="columns"
+        :columns="activeName === '3' ? columnsScene : columns"
         :getDataWay="getDataWay"
         :pagination="pagination"
         index
@@ -128,6 +106,11 @@
             <span>{{ scope.row.ruleDescription }}</span>
           </template>
         </el-table-column>
+        <el-table-column label="规则类型" slot="ruleType" align="center">
+          <template v-slot="scope">
+            <span>{{ ruleMap[scope.row.ruleType] }}</span>
+          </template>
+        </el-table-column>
         <el-table-column label="操作" slot="cgInfos" align="center" width="180">
           <template v-slot="scope">
             <i
@@ -189,6 +172,7 @@ export default {
       },
       ruleTypeOpts, // 规则类型
       searchDate: '', // 创建时间
+      ruleMap: ['', '复杂度', '危险度', '覆盖率', '暴露率'],
       columns: [
         //表格列
         {
@@ -214,6 +198,36 @@ export default {
           template: true,
         },
       ],
+      columnsScene: [
+        //表格列
+        {
+          label: '规则名称',
+          prop: 'ruleName',
+        },
+        {
+          label: '规则描述',
+          prop: 'ruleDescription',
+          showOverflowTooltip: true,
+          template: true,
+        },
+        {
+          label: '规则类型',
+          prop: 'ruleType',
+          template: true,
+        },
+        {
+          label: '创建时间',
+          prop: 'createTime',
+          formatter(row) {
+            return row.createTime.slice(0, 10)
+          },
+        },
+        {
+          label: '操作',
+          prop: 'cgInfos',
+          template: true,
+        },
+      ],
       pagination: {
         //分页使用
         currentPage: 1,
@@ -353,11 +367,14 @@ export default {
       })
     },
     delRow(row) {
-      const obj = this.activeName=='3'?{
-        ruleId: row.ruleId
-      }:{
-        rulesId:row.rulesId
-      }
+      const obj =
+        this.activeName == '3'
+          ? {
+              ruleId: row.ruleId,
+            }
+          : {
+              rulesId: row.rulesId,
+            }
       this.$confirm('确认是否删除?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',

+ 11 - 3
src/views/workManagement/manualRunProjectDetail.vue

@@ -4,7 +4,7 @@
       ref="form"
       :model="form"
       :rules="rules"
-      label-width="135px"
+      label-width="140px"
       class="flexBox"
     >
       <div class="formItemBox">
@@ -144,13 +144,17 @@
           </el-select>
         </el-form-item>
         <el-form-item label="最大仿真时间(s):" prop="maxSimulationTime">
-          <el-input
+          <div style="position: relative;">
+            <el-input
             placeholder="请输入"
             maxlength="10"
             v-autoTrim="{ obj: form, key: 'maxSimulationTime' }"
             v-model="form.maxSimulationTime"
           >
           </el-input>
+            <span style="position: absolute; right: -160px;">(最小是5,最大是600)</span>
+          </div>
+         
         </el-form-item>
         <el-form-item label="是否选择GPU:" prop="isChoiceGpu">
           <el-radio v-model="form.isChoiceGpu" label="0">是</el-radio>
@@ -174,7 +178,7 @@
         </div>
         <div class="tip">(场景数量:{{ sceneCount }})</div>
         <div class="tip">(最多可用资源:{{ maxCount }})</div>
-        <div class="tip">(最小是5,最大是600)</div>
+        <!-- <div class="tip">(最小是5,最大是600)</div> -->
       </div>
     </el-form>
     <div class="btns">
@@ -535,6 +539,10 @@ export default {
       margin-bottom: 22px;
       line-height: 32px;
     }
+    .tip1{
+      margin-bottom: -100px;
+      border: 1px solid black;
+    }
 
     .tipA {
       height: 32px;