Browse Source

手动运行优化

zhangliang2 3 years ago
parent
commit
5b9c9fc751

+ 44 - 20
src/views/workManagement/manualRunProjectDetail.vue

@@ -79,6 +79,7 @@
                 </el-form-item>
                 <el-form-item label="并行度:" prop="parallelism">
                     <el-input
+                        :disabled="runDisabled"
                         placeholder="请输入"
                         maxlength="100"
                         v-autoTrim="{ obj: form, key: 'parallelism' }"
@@ -122,7 +123,7 @@
                         <el-button type="primary">规则查看</el-button>
                     </div>
                 </div> -->
-                <div class="tip">(最多可用资源{{ maxCount }})</div>
+                <div class="tip">(最多可用资源{{ maxCount }})</div>
                 <div class="tip">(最小是5,最大是60)</div>
             </div>
         </el-form>
@@ -134,7 +135,10 @@
                 v-if="this.$route.query.id"
                 >另存为</el-button
             >
-            <el-button type="primary" @click="save(false, true)"
+            <el-button
+                type="primary"
+                @click="save(false, true)"
+                :disabled="runDisabled"
                 >提交</el-button
             >
             <el-button type="primary" plain @click="cancel">取消</el-button>
@@ -145,22 +149,26 @@
 <script>
 //import  from '';
 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();
+};
+let validateNumA = (rule, value, callback) => {
+    !/^(\d+)$/.test(value) && callback(new Error(rule.message));
+    if (value < 5 || value > 60) 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();
+};
+
 export default {
     name: "manualRunProjectDetail", // 手动运行项目详情
     components: {},
     data() {
-        let validateNum = (rule, value, 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 > 60) callback(new Error(rule.message));
-            callback();
-        };
-
         return {
             form: {
                 id: "",
@@ -201,11 +209,11 @@ export default {
                 ],
                 parallelism: [
                     { required: true, message: "请输入", trigger: "blur" },
-                    {
-                        validator: validateNum,
-                        message: "请输入不大于最多可用资源的正整数",
-                        trigger: ["blur"],
-                    },
+                    // {
+                    //     validator: validateNum,
+                    //     message: "请输入不大于最多可用资源的正整数",
+                    //     trigger: ["blur"],
+                    // },
                 ],
                 maxSimulationTime: [
                     { required: true, message: "请输入", trigger: "blur" },
@@ -220,6 +228,7 @@ export default {
                 ],
             },
             sensors: [], // 选中车辆后对应的传感器数组
+            runDisabled: false, // 若最多可用资源为0,则不可点击"提交"
         };
     },
 
@@ -266,10 +275,25 @@ export default {
                 url: this.$api.workManagement.selectMaxParallelism,
                 data: {},
             }).then((res) => {
-                if (res.code == 200 && res.info) {
+                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 || "获取信息失败");
                 }

+ 184 - 185
src/views/workManagement/manualRunProjectList.vue

@@ -1,191 +1,191 @@
 <template>
     <div>
         <div v-if="!$route.path.includes('projectInfo')">
+            <search-layout :needBox="true">
+                <template slot="searchItem1">
+                    <span class="label">项目ID</span>
+                    <el-input
+                        v-model="searchParams.projectId"
+                        size="small"
+                        clearable
+                        placeholder="请输入"
+                        maxlength="60"
+                        @keyup.enter.native="doSearch"
+                    >
+                    </el-input>
+                </template>
+                <template slot="searchItem2">
+                    <span class="label">项目名称</span>
+                    <el-input
+                        v-model="searchParams.projectName"
+                        size="small"
+                        clearable
+                        placeholder="请输入"
+                        maxlength="60"
+                        @keyup.enter.native="doSearch"
+                    >
+                    </el-input>
+                </template>
+                <template slot="searchItem3">
+                    <span class="label">进度</span>
+                    <el-select v-model="searchParams.nowRunState">
+                        <el-option
+                            v-for="item in nowRunStateList"
+                            :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.evaluationLevel">
+                        <el-option
+                            v-for="item in evaluationLevelList"
+                            :label="item.caption"
+                            :value="item.code"
+                            :key="item.code"
+                        ></el-option>
+                    </el-select>
+                </template>
+                <template slot="searchItem5">
+                    <span class="label">创建时间</span>
+                    <el-date-picker
+                        v-model="createDate"
+                        type="daterange"
+                        format="yyyy-MM-dd"
+                        value-format="yyyy-MM-dd"
+                        range-separator="至"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期"
+                    >
+                    </el-date-picker>
+                </template>
+                <template slot="searchItem6">
+                    <span class="label">完成时间</span>
+                    <el-date-picker
+                        v-model="finishDate"
+                        type="daterange"
+                        format="yyyy-MM-dd"
+                        value-format="yyyy-MM-dd"
+                        range-separator="至"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期"
+                    >
+                    </el-date-picker>
+                </template>
 
-        <search-layout :needBox="true">
-            <template slot="searchItem1">
-                <span class="label">项目ID</span>
-                <el-input
-                    v-model="searchParams.projectId"
-                    size="small"
-                    clearable
-                    placeholder="请输入"
-                    maxlength="60"
-                    @keyup.enter.native="doSearch"
-                >
-                </el-input>
-            </template>
-            <template slot="searchItem2">
-                <span class="label">项目名称</span>
-                <el-input
-                    v-model="searchParams.projectName"
-                    size="small"
-                    clearable
-                    placeholder="请输入"
-                    maxlength="60"
-                    @keyup.enter.native="doSearch"
-                >
-                </el-input>
-            </template>
-            <template slot="searchItem3">
-                <span class="label">进度</span>
-                <el-select v-model="searchParams.nowRunState">
-                    <el-option
-                        v-for="item in nowRunStateList"
-                        :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.evaluationLevel">
-                    <el-option
-                        v-for="item in evaluationLevelList"
-                        :label="item.caption"
-                        :value="item.code"
-                        :key="item.code"
-                    ></el-option>
-                </el-select>
-            </template>
-            <template slot="searchItem5">
-                <span class="label">创建时间</span>
-                <el-date-picker
-                    v-model="createDate"
-                    type="daterange"
-                    format="yyyy-MM-dd"
-                    value-format="yyyy-MM-dd"
-                    range-separator="至"
-                    start-placeholder="开始日期"
-                    end-placeholder="结束日期"
+                <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="btnsPanel">
+                <el-button
+                    type="primary"
+                    plain
+                    icon="el-icon-delete"
+                    @click="delRows"
+                    >批量删除</el-button
                 >
-                </el-date-picker>
-            </template>
-            <template slot="searchItem6">
-                <span class="label">完成时间</span>
-                <el-date-picker
-                    v-model="finishDate"
-                    type="daterange"
-                    format="yyyy-MM-dd"
-                    value-format="yyyy-MM-dd"
-                    range-separator="至"
-                    start-placeholder="开始日期"
-                    end-placeholder="结束日期"
+                <el-button
+                    type="primary"
+                    icon="el-icon-circle-plus-outline"
+                    @click="addOne"
+                    >创建</el-button
                 >
-                </el-date-picker>
-            </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>
 
-        <div class="btnsPanel">
-            <el-button
-                type="primary"
-                plain
-                icon="el-icon-delete"
-                @click="delRows"
-                >批量删除</el-button
-            >
-            <el-button
-                type="primary"
-                icon="el-icon-circle-plus-outline"
-                @click="addOne"
-                >创建</el-button
+            <tableList
+                ref="table"
+                style="margin: 0 30px"
+                :columns="columns"
+                :getDataWay="getDataWay"
+                :pagination="pagination"
+                :checkedData="checkedArr"
+                selection
+                index
             >
-        </div>
-
-        <tableList
-            ref="table"
-            style="margin: 0 30px"
-            :columns="columns"
-            :getDataWay="getDataWay"
-            :pagination="pagination"
-            :checkedData="checkedArr"
-            selection
-            index
-        >
-            <el-table-column label="操作" slot="cgInfos" align="center">
-                <template v-slot="scope">
-                    <i
-                        v-if="
-                            scope.row.nowRunState === '10' ||
-                            scope.row.nowRunState === '30' ||
-                            scope.row.nowRunState === '40'
-                        "
-                        @click="runRow(scope.row.id)"
-                        class="el-icon-video-play elIcon"
-                        title="运行"
-                    ></i>
-                    <i
-                        v-if="
-                            scope.row.nowRunState === '10' ||
-                            scope.row.nowRunState === '40'
-                        "
-                        @click="editRow(scope.row)"
-                        class="el-icon-edit-outline elIcon"
-                        title="编辑"
-                    ></i>
-                    <i
-                        @click="viewRow(scope.row.id)"
-                        class="el-icon-view elIcon"
-                        title="查看"
-                    ></i>
-                    <i
-                        v-if="scope.row.nowRunState === '20'"
-                        @click="stopRow(scope.row.id)"
-                        class="el-icon-video-pause elIcon"
-                        title="中止"
-                    ></i>
-                    <i
-                        v-if="
-                            scope.row.nowRunState === '10' ||
-                            scope.row.nowRunState === '30' ||
-                            scope.row.nowRunState === '40'
-                        "
-                        @click="delRow(scope.row.id)"
-                        class="el-icon-delete elIcon"
-                        title="删除"
-                    ></i>
-                    <i
-                        v-if="scope.row.nowRunState != '10'"
-                        @click="downRow(scope.row)"
-                        class="el-icon-download elIcon"
-                        title="下载"
-                    ></i>
-                </template>
-            </el-table-column>
-        </tableList>
-
-        <el-dialog
-            title="下载"
-            :visible.sync="dialogVisible"
-            width="690px"
-            :close-on-click-modal="false"
-            :close-on-press-escape="false"
-            :before-close="cancelDown"
-        >
-            <div class="checkboxPanel">
-                <el-checkbox-group v-model="downType">
-                    <el-checkbox
-                        label="工作报告"
-                        class="labelA"
-                        :disabled="downDisabled"
-                    ></el-checkbox>
-                    <el-checkbox label="任务文件包"></el-checkbox>
-                </el-checkbox-group>
-            </div>
-            <span slot="footer">
-                <el-button type="primary" @click="confirmDown">确 定</el-button>
-                <el-button @click="cancelDown">取 消</el-button>
-            </span>
-        </el-dialog>
+                <el-table-column label="操作" slot="cgInfos" align="center">
+                    <template v-slot="scope">
+                        <i
+                            v-if="
+                                scope.row.nowRunState === '10' ||
+                                scope.row.nowRunState === '30' ||
+                                scope.row.nowRunState === '40'
+                            "
+                            @click="runRow(scope.row.id)"
+                            class="el-icon-video-play elIcon"
+                            title="运行"
+                        ></i>
+                        <i
+                            v-if="
+                                scope.row.nowRunState === '10' ||
+                                scope.row.nowRunState === '40'
+                            "
+                            @click="editRow(scope.row)"
+                            class="el-icon-edit-outline elIcon"
+                            title="编辑"
+                        ></i>
+                        <i
+                            @click="viewRow(scope.row.id)"
+                            class="el-icon-view elIcon"
+                            title="查看"
+                        ></i>
+                        <i
+                            v-if="scope.row.nowRunState === '20'"
+                            @click="stopRow(scope.row.id)"
+                            class="el-icon-video-pause elIcon"
+                            title="中止"
+                        ></i>
+                        <i
+                            v-if="
+                                scope.row.nowRunState === '10' ||
+                                scope.row.nowRunState === '30' ||
+                                scope.row.nowRunState === '40'
+                            "
+                            @click="delRow(scope.row.id)"
+                            class="el-icon-delete elIcon"
+                            title="删除"
+                        ></i>
+                        <i
+                            v-if="scope.row.nowRunState != '10'"
+                            @click="downRow(scope.row)"
+                            class="el-icon-download elIcon"
+                            title="下载"
+                        ></i>
+                    </template>
+                </el-table-column>
+            </tableList>
 
+            <el-dialog
+                title="下载"
+                :visible.sync="dialogVisible"
+                width="690px"
+                :close-on-click-modal="false"
+                :close-on-press-escape="false"
+                :before-close="cancelDown"
+            >
+                <div class="checkboxPanel">
+                    <el-checkbox-group v-model="downType">
+                        <el-checkbox
+                            label="工作报告"
+                            class="labelA"
+                            :disabled="downDisabled"
+                        ></el-checkbox>
+                        <el-checkbox label="任务文件包"></el-checkbox>
+                    </el-checkbox-group>
+                </div>
+                <span slot="footer">
+                    <el-button type="primary" @click="confirmDown"
+                        >确 定</el-button
+                    >
+                    <el-button @click="cancelDown">取 消</el-button>
+                </span>
+            </el-dialog>
         </div>
         <router-view v-else></router-view>
     </div>
@@ -426,7 +426,10 @@ export default {
         },
 
         viewRow(id) {
-            this.$router.push({ path: "/manualRunProjectList/projectInfo", query: { id } });
+            this.$router.push({
+                path: "/manualRunProjectList/projectInfo",
+                query: { id },
+            });
         },
         downRow(row) {
             this.curRow = row;
@@ -492,16 +495,12 @@ export default {
     },
 
     async mounted() {
-        console.log(666);
+        // console.log(666);
         await this.$dicsListsInit({
             nowRunStateList: "projectRunState",
             evaluationLevelList: "evaluationLevel",
         });
-        console.log(this.$route);
     },
-    activated(){
-        console.log(6);
-    }
 };
 </script>
 

+ 217 - 164
src/views/workManagement/projectInfo.vue

@@ -1,197 +1,213 @@
 <template>
     <div class="projectInfoPanel">
-        <div v-if="!$route.path.includes('taskInfo')&&!$route.path.includes('evaluationReport')">
-
-        <div class="headPanel panel">
-            <div class="titlePanel">
-                <div class="titlePanelBor">基本信息</div>
-            </div>
-            <div class="boxContent">
-                <div class="info">
-                    <span>项目ID:</span>
-                    <b>{{ info.projectId }}</b>
-                </div>
-                <div class="info">
-                    <span>项目名称:</span>
-                    <b>{{ info.projectName }}</b>
-                </div>
-                <div class="info">
-                    <span>并行度:</span>
-                    <b>{{ info.parallelism }}</b>
-                </div>
-                <div class="info">
-                    <span>最大仿真时间:</span>
-                    <b>{{ info.maxSimulationTime }}</b>
-                </div>
-                <div class="info">
-                    <span>是否选择GPU:</span>
-                    <b>{{ info.isChoiceGpu }}</b>
-                </div>
-                <div class="info">
-                    <span>创建时间:</span>
-                    <b>{{ info.startTime }}</b>
-                </div>
-                <div class="info">
-                    <span>完成时间:</span>
-                    <b>{{ info.finishTime }}</b>
-                </div>
-                <div class="info">
-                    <span>完成进度:</span>
-                    <b>{{ info.nowRunStateName }}</b>
-                </div>
-                <div class="info">
-                    <span>结果等级:</span>
-                    <b>{{ info.evaluationLevel }}</b>
-                </div>
-                <div class="info">
-                    <span>场景测试包:</span>
-                    <b>{{ info.packageName }}</b>
-                </div>
-                <div class="info">
-                    <span>项目描述:</span>
-                    <b>{{ info.projectDescribe }}</b>
-                </div>
-            </div>
-        </div>
-
-        <div class="flexBox topPanel">
-            <div class="box panel boxB">
+        <div
+            v-if="
+                !$route.path.includes('taskInfo') &&
+                !$route.path.includes('evaluationReport')
+            "
+        >
+            <div class="headPanel panel">
                 <div class="titlePanel">
-                    <div class="titlePanelBor">算法配置</div>
+                    <div class="titlePanelBor">基本信息</div>
                 </div>
                 <div class="boxContent">
                     <div class="info">
-                        <span>算法名称:</span>
-                        <b>{{ info.algorithmName }}</b>
+                        <span>项目ID:</span>
+                        <b>{{ info.projectId }}</b>
+                    </div>
+                    <div class="info">
+                        <span>项目名称:</span>
+                        <b>{{ info.projectName }}</b>
+                    </div>
+                    <div class="info">
+                        <span>并行度:</span>
+                        <b>{{ info.parallelism }}</b>
+                    </div>
+                    <div class="info">
+                        <span>最大仿真时间:</span>
+                        <b>{{ info.maxSimulationTime }}</b>
                     </div>
                     <div class="info">
-                        <span>算法描述:</span>
-                        <b>{{ info.algorithmDescribe }}</b>
+                        <span>是否选择GPU:</span>
+                        <b>{{ info.isChoiceGpu }}</b>
+                    </div>
+                    <div class="info">
+                        <span>创建时间:</span>
+                        <b>{{ info.startTime }}</b>
+                    </div>
+                    <div class="info">
+                        <span>完成时间:</span>
+                        <b>{{ info.finishTime }}</b>
+                    </div>
+                    <div class="info">
+                        <span>完成进度:</span>
+                        <b>{{ info.nowRunStateName }}</b>
+                    </div>
+                    <div class="info">
+                        <span>结果等级:</span>
+                        <b>{{ info.evaluationLevel }}</b>
+                    </div>
+                    <div class="info">
+                        <span>场景测试包:</span>
+                        <b>{{ info.packageName }}</b>
+                    </div>
+                    <div class="info">
+                        <span>项目描述:</span>
+                        <b>{{ info.projectDescribe }}</b>
                     </div>
                 </div>
             </div>
-            <div class="box panel">
+
+            <div class="panel">
                 <div class="titlePanel">
-                    <div class="titlePanelBor">测试报告</div>
-                    <i
-                        class="el-icon-download download"
-                        v-bind:class="{ cursor: info.nowRunState === '30' }"
-                        @click="downReport"
-                    ></i>
+                    <div class="titlePanelBor">测评得分</div>
                 </div>
-                <div class="boxContent boxContentC">
-                    <div class="cbox" @click="toReport">
-                        <img
-                            :src="downImgSrc"
-                            width="100%"
-                            v-bind:class="{ cursor: info.nowRunState === '30' }"
-                        />
-                        <div
-                            v-bind:class="{ cursor: info.nowRunState === '30' }"
-                        >
-                            仿真云测试报告
-                        </div>
-                    </div>
+                <div class="box">
+                    <tableList
+                        style="margin: 30px 0"
+                        :columns="columnsA"
+                        :getDataWay="getDataWayA"
+                    >
+                    </tableList>
                 </div>
             </div>
-        </div>
 
-        <div class="centerPanel panel">
-            <div class="titlePanel">
-                <div class="titlePanelBor">车辆配置</div>
-            </div>
-            <div class="box">
-                <div class="boxContentA">
-                    <div class="info">
-                        <span>车辆名称:</span>
-                        <b>{{ info.vehicleName }}</b>
+            <div class="flexBox topPanel">
+                <div class="box panel boxB">
+                    <div class="titlePanel">
+                        <div class="titlePanelBor">算法配置</div>
                     </div>
-                    <div class="info">
-                        <span>车辆描述:</span>
-                        <b>{{ info.vehicleDescribe }}</b>
+                    <div class="boxContent">
+                        <div class="info">
+                            <span>算法名称:</span>
+                            <b>{{ info.algorithmName }}</b>
+                        </div>
+                        <div class="info">
+                            <span>算法描述:</span>
+                            <b>{{ info.algorithmDescribe }}</b>
+                        </div>
                     </div>
                 </div>
-                <div class="boxContentB">
-                    <div class="list">
-                        <handle-config-list
-                            :showBtns="false"
-                            :curOne="curOne"
-                            :configList="configList"
-                            @curItem="curItem"
-                            :needHighline="false"
-                        ></handle-config-list>
+                <div class="box panel">
+                    <div class="titlePanel">
+                        <div class="titlePanelBor">测试报告</div>
+                        <i
+                            class="el-icon-download download"
+                            v-bind:class="{ cursor: info.nowRunState === '30' }"
+                            @click="downReport"
+                        ></i>
                     </div>
-                    <div class="canvasBox">
-                        <!-- <img
-                            src="../../assets/common/image/others/2.png"
-                            width="100%"
-                        /> -->
-                        <canvas-sensor
-                            v-if="modelImgSrc"
-                            :modelImgSrc="modelImgSrc"
-                            :configList="configList"
-                        ></canvas-sensor>
+                    <div class="boxContent boxContentC">
+                        <div class="cbox" @click="toReport">
+                            <img
+                                :src="downImgSrc"
+                                width="100%"
+                                v-bind:class="{
+                                    cursor: info.nowRunState === '30',
+                                }"
+                            />
+                            <div
+                                v-bind:class="{
+                                    cursor: info.nowRunState === '30',
+                                }"
+                            >
+                                仿真云测试报告
+                            </div>
+                        </div>
                     </div>
                 </div>
             </div>
-        </div>
 
-        <div class="bottomPanel panel">
-            <div class="titlePanel">
-                <div class="titlePanelBor">任务信息</div>
-            </div>
-            <div class="box">
-                <div class="boxContentA">
-                    <div class="chart">
-                        <div class="pieTitle">任务运行状态统计:</div>
-                        <div class="pie">
-                            <pie-chart-project-info
-                                id="projectInfoPieA"
-                                :stateList="stateList"
-                                stateName="stateName"
-                                seriesName="任务运行状态统计"
-                            ></pie-chart-project-info>
+            <div class="centerPanel panel">
+                <div class="titlePanel">
+                    <div class="titlePanelBor">车辆配置</div>
+                </div>
+                <div class="box">
+                    <div class="boxContentA">
+                        <div class="info">
+                            <span>车辆名称:</span>
+                            <b>{{ info.vehicleName }}</b>
+                        </div>
+                        <div class="info">
+                            <span>车辆描述:</span>
+                            <b>{{ info.vehicleDescribe }}</b>
                         </div>
                     </div>
-                    <div class="chart">
-                        <div class="pieTitle">结果动态统计:</div>
-                        <div class="pie">
-                            <pie-chart-project-info
-                                id="projectInfoPieB"
-                                :stateList="resultList"
-                                stateName="resultName"
-                                seriesName="结果动态统计"
-                            ></pie-chart-project-info>
+                    <div class="boxContentB">
+                        <div class="list">
+                            <handle-config-list
+                                :showBtns="false"
+                                :curOne="curOne"
+                                :configList="configList"
+                                @curItem="curItem"
+                                :needHighline="false"
+                            ></handle-config-list>
+                        </div>
+                        <div class="canvasBox">
+                            <canvas-sensor
+                                v-if="modelImgSrc"
+                                :modelImgSrc="modelImgSrc"
+                                :configList="configList"
+                            ></canvas-sensor>
                         </div>
                     </div>
                 </div>
-                <div>
-                    <tableList
-                        ref="table"
-                        style="margin: 0 30px"
-                        :columns="columns"
-                        :getDataWay="getDataWay"
-                        :pagination="pagination"
-                    >
-                        <el-table-column
-                            label="操作"
-                            slot="cgInfos"
-                            align="center"
+            </div>
+
+            <div class="bottomPanel panel">
+                <div class="titlePanel">
+                    <div class="titlePanelBor">任务信息</div>
+                </div>
+                <div class="box">
+                    <div class="boxContentA">
+                        <div class="chart">
+                            <div class="pieTitle">任务运行状态统计:</div>
+                            <div class="pie">
+                                <pie-chart-project-info
+                                    id="projectInfoPieA"
+                                    :stateList="stateList"
+                                    stateName="stateName"
+                                    seriesName="任务运行状态统计"
+                                ></pie-chart-project-info>
+                            </div>
+                        </div>
+                        <div class="chart">
+                            <div class="pieTitle">得分统计:</div>
+                            <div class="pie">
+                                <pie-chart-project-info
+                                    id="projectInfoPieB"
+                                    :stateList="resultList"
+                                    stateName="resultName"
+                                    seriesName="得分统计"
+                                ></pie-chart-project-info>
+                            </div>
+                        </div>
+                    </div>
+                    <div>
+                        <tableList
+                            ref="table"
+                            :columns="columns"
+                            :getDataWay="getDataWay"
+                            :pagination="pagination"
                         >
-                            <template v-slot="scope">
-                                <i
-                                    @click="viewRow(scope.row)"
-                                    class="el-icon-view elIcon"
-                                    title="查看"
-                                ></i>
-                            </template>
-                        </el-table-column>
-                    </tableList>
+                            <el-table-column
+                                label="操作"
+                                slot="cgInfos"
+                                align="center"
+                            >
+                                <template v-slot="scope">
+                                    <i
+                                        @click="viewRow(scope.row)"
+                                        class="el-icon-view elIcon"
+                                        title="查看"
+                                    ></i>
+                                </template>
+                            </el-table-column>
+                        </tableList>
+                    </div>
                 </div>
             </div>
         </div>
-
-        </div>
         <router-view v-else></router-view>
     </div>
 </template>
@@ -240,12 +256,38 @@ export default {
                     label: "运行结果",
                     prop: "runResult",
                 },
+                {
+                    label: "得分",
+                    prop: "score",
+                },
                 {
                     label: "操作",
                     prop: "cgInfos",
                     template: true,
                 },
             ],
+            columnsA: [
+                {
+                    label: "测试项目",
+                    prop: "projectName",
+                },
+                {
+                    label: "场景数量",
+                    prop: "sceneNum",
+                },
+                {
+                    label: "测试权重%",
+                    prop: "weight",
+                },
+                {
+                    label: "测试得分",
+                    prop: "score",
+                },
+                {
+                    label: "得分率%",
+                    prop: "scoreRatio",
+                },
+            ],
             pagination: {
                 //分页使用
                 currentPage: 1,
@@ -264,6 +306,14 @@ export default {
                     id: this.$route.query.id,
                 },
             },
+            getDataWayA: {
+                //加载表格数据
+                dataType: "data",
+                type: "post",
+                firstRequest: false,
+                data: [],
+                param: {},
+            },
             // 传感器对象集合
             configList: {
                 camera: [],
@@ -350,7 +400,7 @@ export default {
     },
 
     mounted() {
-        console.log(this.$route);
+        // console.log(this.$route);
         if (this.$route.query.id) {
             this.id = this.$route.query.id;
 
@@ -381,7 +431,10 @@ export default {
                         }
 
                         this.stateList = res.info.stateList || [];
-                        this.resultList = res.info.resultList || [];
+                        this.resultList = res.info.resultScoreList || [];
+                        // this.resultList = res.info.resultList || [];
+
+                        this.getDataWayA.data = res.info.algorithmScoreList;
                     } else {
                         this.$message.error(res.message || "获取信息失败");
                     }
@@ -408,7 +461,7 @@ export default {
         border-bottom: 1px dotted @gray;
     }
 
-    .headPanel{
+    .headPanel {
         margin-bottom: 25px;
 
         .box {

+ 27 - 1
src/views/workManagement/taskInfo.vue

@@ -36,6 +36,20 @@
             </div>
         </div>
 
+        <div class="panel">
+            <div class="titlePanel">
+                <div class="titlePanelBor">得分详情</div>
+            </div>
+            <div class="box">
+                <tableList
+                    style="margin: 30px 0"
+                    :columns="columnsB"
+                    :getDataWay="getDataWayB"
+                >
+                </tableList>
+            </div>
+        </div>
+
         <div class="panel boxB">
             <div class="titlePanel">
                 <div class="titlePanelBor">仿真动画</div>
@@ -194,7 +208,7 @@
                             id="taskInfoLineG"
                             :xList="xList"
                             :yList="yListG"
-                            yUnit="m/s"
+                            yUnit="km/h"
                         ></line-chart-task-info>
                     </div>
                 </div>
@@ -276,6 +290,15 @@ export default {
                 ],
                 param: {},
             },
+            columnsB: [],
+            getDataWayB: {
+                //加载表格数据
+                dataType: "data",
+                type: "post",
+                firstRequest: false,
+                data: [],
+                param: {},
+            },
             xList: [],
             yListA: [],
             yListB: [],
@@ -329,6 +352,9 @@ export default {
                     }
 
                     this.videoUrl = res.info.videoUrl || [];
+
+                    this.columnsB = res.info.sceneScoreLiTitle;
+                    this.getDataWayB.data = res.info.sceneScoreLi;
                 } else {
                     this.$message.error(res.message || "获取信息失败");
                 }