zhangliang2 3 роки тому
батько
коміт
27a13a3123

+ 2 - 0
src/api/index.js

@@ -1,9 +1,11 @@
 import Vue from "vue";
 
 import common from './common.js'
+import sceneLibrary from './sceneLibrary.js'
 
 const api = {
     common,
+    sceneLibrary,
 }
 
 export default api;

+ 27 - 0
src/api/sceneLibrary.js

@@ -0,0 +1,27 @@
+const basePart = '/simulation/resource/server';
+// const queryScenePackageSublistList = basePart + '/ScenePackage/queryScenePackageSublistList';
+
+
+const queryScoringRulesList = basePart + '/ScoringRules/queryScoringRulesList'; // 打分规则列表
+const queryScoringRules = basePart + '/ScoringRules/queryScoringRules'; // 查询打分规则详情
+const saveScoringRules = basePart + '/ScoringRules/saveScoringRules'; // 保存打分规则详情
+const fxScoringRules = basePart + '/ScoringRules/fxScoringRules'; // 分享打分规则
+const deleteScoringRules = basePart + '/ScoringRules/deleteScoringRules'; // 删除打分规则
+
+const queryStandardsRegulationsList = basePart + '/StandardsRegulations/queryStandardsRegulationsList'; // 标准法规仿真场景列表
+const download = basePart + '/StandardsRegulations/download'; // 
+
+export default {
+    // queryScenePackageSublistList,
+    queryScoringRulesList,
+    queryScoringRules,
+    saveScoringRules,
+    fxScoringRules,
+    deleteScoringRules,
+
+    queryStandardsRegulationsList,
+    download
+}
+
+
+//localhost:7003/simulation/resource/server/ScenePackage/queryScenePackageSublistList

+ 56 - 0
src/assets/common/css/theme.less

@@ -362,6 +362,62 @@
     border-radius: 3px;
 }
 
+.el-tabs {
+    width: 285px;
+    margin: 45px 40px 15px;
+    color: @themeColor;
+
+    .el-tabs__content {
+        display: none;
+    }
+
+    .el-tabs__nav-scroll {
+        padding-left: 25px;
+        position: relative;
+
+        &:before {
+            content: "";
+            display: block;
+            position: absolute;
+            left: 0;
+            bottom: 0;
+            width: 25px;
+            height: 1px;
+            border-bottom: 1px solid @themeColor;
+        }
+
+        &:after {
+            content: "";
+            display: block;
+            position: absolute;
+            right: 0;
+            bottom: 0;
+            width: 60px;
+            height: 1px;
+            border-bottom: 1px solid @themeColor;
+        }
+    }
+}
+
+.el-tabs--card>.el-tabs__header {
+    border-bottom: none;
+}
+
+.el-tabs--card>.el-tabs__header .el-tabs__nav {
+    border: none;
+}
+
+.addBtn {
+    &.el-button {
+        background: #F5F7FA;
+        border: 1px solid #DEE6F3;
+        color: #BABABA;
+    }
+}
+
+
+
+
 
 
 

+ 2 - 0
src/axios/filter.js

@@ -84,6 +84,8 @@ axios.interceptors.response.use(function (response) {
             message: '服务器未启动或正在重启,请稍后再试!'
         });
     }*/
+    console.log('网络异常');
+    ElementUI.Message.error("网络异常");
     return Promise.reject(error);
 });
 

+ 6 - 1
src/components/grid/TableList.vue

@@ -537,7 +537,12 @@
                             if(_this.loadErrorMessageFlag == true){
                                 _this.$message({
                                     type:'warning',
-                                    message:data.msg
+                                    message:data.message
+                                })
+                            }else {
+                                _this.$message({
+                                    type:'warning',
+                                    message:data.message
                                 })
                             }
                             _this.loading=false;

+ 24 - 0
src/views/index.vue

@@ -45,4 +45,28 @@ export default {
 .mainBox {
     padding-bottom: 60px;
 }
+
+/deep/ .el-tabs--card > .el-tabs__header .el-tabs__item {
+    border: 1px solid @gray;
+    border-bottom-color: @themeColor;
+    border-radius: 3px 3px 0 0;
+    font-size: 14px;
+    font-weight: bold;
+
+    &:first-child {
+        border-right-color: transparent;
+    }
+
+    &:nth-child(2) {
+        border-left-color: transparent;
+    }
+
+    &.is-active {
+        border: 1px solid @themeColor;
+        border-bottom-color: #ffffff;
+        // font-size: 16px;
+        // height: 40px;
+        // line-height: 40px;
+    }
+}
 </style>

+ 10 - 10
src/views/modelLibrary/addVehicleConfiguration.vue

@@ -60,11 +60,6 @@
                 </div>
                 <div class="model">
                     <img src="../../assets/common/image/car.png" width="100%" />
-                    <div class="btns">
-                        <el-button type="primary" @click="save">保存</el-button>
-                        <el-button type="primary">取消</el-button>
-                        <el-button type="primary">分享</el-button>
-                    </div>
                 </div>
                 <div class="conditions">
                     <div class="titlePanel">
@@ -129,6 +124,11 @@
                     </div>
                 </div>
             </div>
+            <div class="btns">
+                <el-button type="primary" @click="save">保存</el-button>
+                <el-button type="primary">取消</el-button>
+                <el-button type="primary">分享</el-button>
+            </div>
         </el-form>
     </div>
 </template>
@@ -278,11 +278,6 @@ export default {
         width: 400px;
     }
 
-    .btns {
-        padding-top: 30px;
-        text-align: right;
-    }
-
     .conditions {
         .titlePanel {
             padding-bottom: 30px;
@@ -302,4 +297,9 @@ export default {
         }
     }
 }
+
+.btns {
+    padding-top: 30px;
+    text-align: center;
+}
 </style>

+ 9 - 5
src/views/page/breadCrumb.vue

@@ -4,7 +4,7 @@
             <el-breadcrumb separator="/">
                 <transition-group name="breadcrumb">
                     <el-breadcrumb-item
-                        v-for="item in list"
+                        v-for="(item, index) in list"
                         :key="item.path + item.name"
                     >
                         <router-link
@@ -20,6 +20,10 @@
                                     : $route.fullPath
                             "
                         >
+                            <i
+                                class="el-icon-folder-opened"
+                                v-if="index > 1"
+                            ></i>
                             {{ item.meta.tabname }}
                         </router-link>
                         <span v-else style="line-height: 20px">{{
@@ -58,13 +62,13 @@ export default {
                 if (item.name === this.$route.name) {
                     item.fullPath = this.$route.fullPath;
                 }
-                if(item.name==="mainPage") {
+                if (item.name === "mainPage") {
                     isMainPage = true;
                 }
             });
-            if(isMainPage) {
-                return this.$route.matched.slice(0,1);
-            }else {
+            if (isMainPage) {
+                return this.$route.matched.slice(0, 1);
+            } else {
                 return this.$route.matched;
             }
         },

+ 6 - 2
src/views/page/pageMenu.vue

@@ -157,8 +157,12 @@ export default {
         },
     },
     created() {
+        localStorage.setItem(
+            "Authorization",
+            "Bearer 34d4020a-b746-4cc7-8cde-b3a8c3efbc11"
+        );
         // console.log(this.$route);
-        let { code, ticket } = this.$route.query;
+        /* let { code, ticket } = this.$route.query;
         if (code && ticket) {
             this.$axios({
                 method: "post",
@@ -176,7 +180,7 @@ export default {
             });
         } else {
             console.log(66);
-        }
+        } */
     },
 };
 </script>

+ 99 - 21
src/views/sceneLibrary/gradingRule.vue

@@ -1,33 +1,33 @@
 <template>
     <div>
         <el-form ref="form" :model="form" :rules="rules" label-width="108px">
-            <el-form-item label="规则名称:" prop="name">
+            <el-form-item label="规则名称:" prop="ruleName">
                 <el-input
                     placeholder="请输入"
-                    maxlength="30"
-                    v-autoTrim="{ obj: form, key: 'name' }"
-                    v-model="form.name"
+                    maxlength="60"
+                    v-autoTrim="{ obj: form, key: 'ruleName' }"
+                    v-model="form.ruleName"
                 >
                 </el-input>
             </el-form-item>
 
-            <el-form-item label="规则描述:" prop="x">
+            <el-form-item label="规则描述:" prop="ruleDescription">
                 <el-input
                     placeholder="请输入"
-                    maxlength="30"
-                    v-autoTrim="{ obj: form, key: 'x' }"
-                    v-model="form.x"
+                    maxlength="120"
+                    v-autoTrim="{ obj: form, key: 'ruleDescription' }"
+                    v-model="form.ruleDescription"
                 >
                 </el-input>
             </el-form-item>
 
-            <el-form-item label="规则详情:" prop="des">
+            <el-form-item label="规则详情:" prop="ruleDetails">
                 <el-input
                     v-autoTrim="{
                         obj: form,
-                        key: 'des',
+                        key: 'ruleDetails',
                     }"
-                    v-model="form.des"
+                    v-model="form.ruleDetails"
                     type="textarea"
                     placeholder="请输入"
                     :autosize="{ minRows: 8, maxRows: 8 }"
@@ -36,8 +36,22 @@
             </el-form-item>
 
             <div class="btns">
-                <el-button type="primary">保存</el-button>
-                <el-button type="primary" plain>取消</el-button>
+                <!-- 公有列表进,另存为+取消 另存为为新增一天数据 新增数据均为私有 1 -->
+                <!-- 私有列表进,保存+另存为+取消 0 -->
+                <!-- 新增进,保存+取消 -1 -->
+                <el-button
+                    type="primary"
+                    v-if="share === '0' || share === '-1'"
+                    @click="save(false)"
+                    >保存</el-button
+                >
+                <el-button
+                    type="primary"
+                    v-if="share === '0' || share === '1'"
+                    @click="save(true)"
+                    >另存为</el-button
+                >
+                <el-button type="primary" plain @click="cancel">取消</el-button>
             </div>
         </el-form>
     </div>
@@ -51,24 +65,88 @@ export default {
     components: {},
     data() {
         return {
+            share: "-1", //控制显示按钮
             form: {
-                name: "",
-                des: "",
-                x: "",
+                rulesId: "",
+                ruleName: "",
+                share: "-1",
+                ruleDescription: "",
+                ruleDetails: "",
             },
             rules: {
-                name: [{ required: true, message: "请输入", trigger: "blur" }],
-                des: [{ required: true, message: "请输入", trigger: "blur" }],
-                x: [{ required: true, message: "请输入", trigger: "blur" }],
+                ruleName: [
+                    { required: true, message: "请输入", trigger: "blur" },
+                ],
+                ruleDescription: [
+                    { required: true, message: "请输入", trigger: "blur" },
+                ],
+                ruleDetails: [
+                    { required: true, message: "请输入", trigger: "blur" },
+                ],
             },
         };
     },
 
     computed: {},
 
-    methods: {},
+    methods: {
+        save(isAdd) {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    if (isAdd || !this.$route.query.formData) { // 另存为或新增页面
+                        this.form.rulesId = "";
+                        this.form.share = "0";
+                    }
+
+                    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 || "保存失败!");
+                        // });
+                }
+            });
+        },
+        cancel(){
+            this.$router.replace({ path: "/gradingRulesList" });
+        }
+    },
+
+    mounted() {
+        let rulesId = "";
+        if (this.$route.query.formData) {
+            this.form.rulesId = rulesId = this.$route.query.formData.rulesId;
+            this.form.share = this.$route.query.formData.share;
+        }
+        this.share = this.form.share;
 
-    // mounted() {},
+        if (rulesId) {
+            this.$axios({
+                method: "post",
+                url: this.$api.sceneLibrary.queryScoringRules,
+                data: {
+                    rulesId,
+                },
+            }).then((res) => {
+                console.log(res);
+                if (res.code == 200 && res.info) {
+                    this.form = res.info;
+                }
+            });
+        }
+    },
 };
 </script>
 

+ 172 - 83
src/views/sceneLibrary/gradingRulesList.vue

@@ -4,66 +4,68 @@
             <template slot="searchItem1">
                 <span class="label">规则ID</span>
                 <el-input
-                    v-model="searchParams.id"
+                    v-model="searchParams.rulesId"
                     size="small"
                     clearable
                     placeholder="请输入"
+                    maxlength="60"
                 >
                 </el-input>
             </template>
             <template slot="searchItem2">
                 <span class="label">规则名称</span>
                 <el-input
-                    v-model="searchParams.id"
+                    v-model="searchParams.ruleName"
                     size="small"
                     clearable
                     placeholder="请输入"
+                    maxlength="60"
                 >
                 </el-input>
             </template>
             <template slot="searchItem3">
                 <span class="label">规则描述</span>
                 <el-input
-                    v-model="searchParams.id"
+                    v-model="searchParams.ruleDescription"
                     size="small"
                     clearable
                     placeholder="请输入"
+                    maxlength="120"
                 >
                 </el-input>
             </template>
             <template slot="searchItem4">
                 <span class="label">创建时间</span>
                 <el-date-picker
-                    v-model="searchParams.clientOrgName1"
-                    type="date"
-                    placeholder="选择日期"
+                    v-model="searchDate"
+                    type="daterange"
+                    format="yyyy-MM-dd"
+                    value-format="yyyy-MM-dd"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
                 >
                 </el-date-picker>
             </template>
             <template slot="searchBtn1">
-                <el-button type="primary">查询</el-button>
+                <el-button type="primary" @click="doSearch">查询</el-button>
             </template>
             <template slot="searchBtn2">
-                <el-button type="primary">重置</el-button>
+                <el-button type="primary" @click="doReset">重置</el-button>
             </template>
         </search-layout>
 
         <div class="tabsBox">
-            <toolbarTab
-                :isConnect="true"
-                position="top"
-                :subPageActiveName="subPageActiveName"
-                :toolbarItem="pageBtnList"
-                @toolbarClick="pageControl"
-                class="toolbarTab"
-            >
-            </toolbarTab>
+            <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>
             <el-button
+                class="addBtn"
                 icon="el-icon-circle-plus-outline"
                 @click="addConfig"
                 type="primary"
-                plain
-                :disabled="activitedPageNum === 1"
+                :disabled="activeName === '1'"
                 >新增</el-button
             >
         </div>
@@ -76,6 +78,15 @@
             :pagination="pagination"
             index
         >
+            <el-table-column
+                label="规则描述"
+                slot="ruleDescription"
+                align="center"
+            >
+                <template v-slot="scope">
+                    <span>{{ scope.row.ruleDescription }}</span>
+                </template>
+            </el-table-column>
             <el-table-column
                 label="操作"
                 slot="cgInfos"
@@ -84,17 +95,22 @@
             >
                 <template v-slot="scope">
                     <i
-                            @click="addMarkDia(scope.row)"
-                            class="el-icon-share elIcon"
-                        ></i>
-                        <i
-                            @click="addMarkDia(scope.row)"
-                            class="el-icon-edit-outline elIcon"
-                        ></i>
-                        <i
-                            @click="addMarkDia(scope.row)"
-                            class="el-icon-delete elIcon"
-                        ></i>
+                        v-if="activeName === '2'"
+                        @click="shareRow(scope.row)"
+                        class="el-icon-share elIcon"
+                        title="分享"
+                    ></i>
+                    <i
+                        @click="editRow(scope.row)"
+                        class="el-icon-edit-outline elIcon"
+                        title="编辑"
+                    ></i>
+                    <i
+                        v-if="activeName === '2'"
+                        @click="delRow(scope.row)"
+                        class="el-icon-delete elIcon"
+                        title="删除"
+                    ></i>
                 </template>
             </el-table-column>
         </tableList>
@@ -111,51 +127,34 @@ export default {
     components: { searchLayout, tableList, toolbarTab },
     data() {
         return {
+            activeName: "1",
             searchParams: {
                 //搜索参数
-                id: "", //ID
-                clientOrgName: "", //车辆名称
-                clientOrgName1: "", //配置名称
-                clientOrgName2: "", //配置描述
-                status: "",
-                c: [],
+                rulesId: "", //规则Id
+                ruleName: "", //规则名称
+                ruleDescription: "", //规则描述
+                yearMin: "", // 开始时间
+                yearMax: "", // 结束时间
             },
-            list: [],
-            activitedPageNum: 1,
-            subPageActiveName: 1,
-            pageBtnList: [
-                {
-                    type: "primary",
-                    title: "公有",
-                    key: "all",
-                    fromId: 1,
-                    method: "showAll",
-                    plain: true,
-                    disabled: false,
-                },
-                {
-                    type: "primary",
-                    title: "私有",
-                    key: "notRead",
-                    fromId: 2,
-                    method: "showNotRead",
-                    plain: true,
-                    disabled: false,
-                },
-            ],
+            searchDate: "", // 创建时间
             columns: [
                 //表格列
                 {
                     label: "规则名称",
-                    prop: "aid1",
+                    prop: "ruleName",
                 },
                 {
                     label: "规则描述",
-                    prop: "ktName",
+                    prop: "ruleDescription",
+                    showOverflowTooltip: true,
+                    template: true,
                 },
                 {
                     label: "创建时间",
-                    prop: "jbSource",
+                    prop: "createTime",
+                    formatter(row) {
+                        return row.createTime.slice(0, 10);
+                    },
                 },
                 {
                     label: "操作",
@@ -173,40 +172,127 @@ export default {
             },
             getDataWay: {
                 //加载表格数据
-                dataType: "data",
+                dataType: "url",
                 type: "post",
-                firstRequest: false,
-                data: [
-                    {
-                        id: 1,
-                        ktName: "kjdhfkjsdhfkjsjhdfksdjhfkhwoieyrhfisdhfksjhdf",
-                        jbSource: "收到就好付款时间的回复可见收到货覅无痕",
-                    },
-                    { id: 2 },
-                    { id: 3 },
-                    { id: 4 },
-                    { id: 51 },
-                    { id: 6 },
-                ],
-                param: {},
+                // firstRequest: false,
+                data: this.$api.sceneLibrary.queryScoringRulesList,
+                param: {
+                    packageId: "11111111",
+                    share: "1",
+                },
             },
             dialogVisible: false,
         };
     },
     methods: {
+        doSearch() {
+            if (this.searchDate) {
+                this.searchParams.yearMin = `${this.searchDate[0]} 00:00:00`;
+                this.searchParams.yearMax = `${this.searchDate[1]} 23:59:59`;
+            } else {
+                this.searchParams.yearMin = "";
+                this.searchParams.yearMax = "";
+            }
+
+            let pageMap = {
+                rulesId: this.searchParams.rulesId,
+                ruleName: this.searchParams.ruleName,
+                ruleDescription: this.searchParams.ruleDescription,
+                yearMin: this.searchParams.yearMin,
+                yearMax: this.searchParams.yearMax,
+                share: this.activeName === "1" ? "1" : "0",
+            };
+            this.refreshList(pageMap);
+        },
+        //刷新table
+        refreshList(param) {
+            param
+                ? this.$refs["table"].loadData(param)
+                : this.$refs["table"].loadData();
+        },
+        doReset() {
+            this.searchParams = {
+                rulesId: "",
+                ruleName: "",
+                ruleDescription: "",
+                yearMin: "",
+                yearMax: "",
+            };
+            this.searchDate = "";
+            this.doSearch();
+        },
         viewRow(row) {
             this.dialogVisible = true;
         },
         pageControl(data) {
-            this.activitedPageNum = data.fromId;
+            this.activeName = data.name;
+            this.doSearch();
         },
         addConfig() {
             this.$router.push({ path: "/gradingRule" });
         },
-        addMarkDia() {},
+        shareRow(row) {
+            this.$confirm("确认是否分享?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            }).then((e) => {
+                this.$axios({
+                    method: "post",
+                    url: this.$api.sceneLibrary.fxScoringRules,
+                    data: {
+                        rulesId: row.rulesId
+                    },
+                }).then((res) => {
+                    if (res.code == 200) {
+                        this.$message.success("分享成功");
+                    } else {
+                        this.$message.error(res.message || "分享失败");
+                    }
+                    this.doSearch();
+                });
+            });
+        },
+        delRow(row) {
+            this.$confirm("确认是否删除?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            }).then((e) => {
+                this.$axios({
+                    method: "post",
+                    url: this.$api.sceneLibrary.deleteScoringRules,
+                    data: {
+                        rulesId: row.rulesId
+                    },
+                }).then((res) => {
+                    if (res.code == 200) {
+                        this.$message.success("删除成功");
+                    } else {
+                        this.$message.error(res.message || "删除失败");
+                    }
+                    this.doSearch();
+                });
+            });
+        },
+        editRow(row) {
+            this.$router.push({
+                path: "/gradingRule",
+                // params: {
+                //     rulesId: row.rulesId,
+                //     share: row.share,
+                // },
+                query: {
+                    formData: {
+                        rulesId: row.rulesId,
+                        share: row.share,
+                    },
+                },
+            });
+        },
     },
 
-    // mounted: {},
+    mounted() {},
 };
 </script>
 
@@ -217,12 +303,15 @@ export default {
 
     .el-button {
         position: absolute;
+        bottom: 18px;
         right: 40px;
-        top: 45px;
     }
 }
 
-.toolbarTab {
-    margin: 45px 40px 15px;
+.el-range-editor.el-input__inner {
+    padding: 0 10px;
+}
+/deep/ .el-date-editor .el-range-separator {
+    width: 6%;
 }
 </style>

+ 0 - 3
src/views/sceneLibrary/naturalDrivingScenarioList.vue

@@ -199,9 +199,6 @@ export default {
                         jbSource: "收到就好付款时间的回复可见收到货覅无痕",
                     },
                     { id: 2 },
-                    { id: 3 },
-                    { id: 4 },
-                    { id: 51 },
                     { id: 6 },
                 ],
                 param: {},

+ 67 - 29
src/views/sceneLibrary/standardRegulationSimulationScenarioList.vue

@@ -4,8 +4,9 @@
             <template slot="searchItem1">
                 <span class="label">场景名称</span>
                 <el-input
-                    v-model="searchParams.id"
+                    v-model="searchParams.sceneName"
                     size="small"
+                    maxlength="60"
                     clearable
                     placeholder="请输入"
                 >
@@ -13,7 +14,7 @@
             </template>
             <template slot="searchItem2">
                 <span class="label">法规类型</span>
-                <el-select v-model="searchParams.status" multiple>
+                <el-select v-model="searchParams.regulationType" multiple>
                     <el-option
                         v-for="item in list"
                         :label="item.caption"
@@ -25,8 +26,9 @@
             <template slot="searchItem3">
                 <span class="label">标准类型</span>
                 <el-input
-                    v-model="searchParams.id"
+                    v-model="searchParams.standardType"
                     size="small"
+                    maxlength="60"
                     clearable
                     placeholder="请输入"
                 >
@@ -64,7 +66,7 @@
 
         <tableList
             ref="table"
-            style="border-top: none; margin: 30px"
+            style="margin: 30px"
             :columns="columns"
             :getDataWay="getDataWay"
             :pagination="pagination"
@@ -112,6 +114,45 @@
 import searchLayout from "@/components/grid/searchLayout";
 import tableList from "@/components/grid/TableList";
 
+function isObject(obj) {
+  return Object.prototype.toString.call(obj) === '[object Object]'
+}
+
+function getUrlParams(url, param, fileName) {
+    fileName = encodeURIComponent(fileName);
+    const map = [
+        "currentPage",
+        "pageSizes",
+        "pageSize",
+        "position",
+        "layout",
+        "pageNum",
+        "total",
+    ];
+    if (Array.isArray(param)) {
+        return `${url}?ids=${param.toString()}&fileName=${fileName}`;
+    } else {
+        let flag = false;
+        let obj = Object.assign({}, param);
+        obj.fileName = fileName;
+        for (const key in obj) {
+            if (obj[key] && !isObject(obj[key]) && !map.includes(key)) {
+                if (!flag) {
+                    url += "?";
+                    flag = true;
+                }
+                if (Array.isArray(obj[key])) {
+                    obj[key] = obj[key].toString();
+                }
+                url += `${key}=${obj[key]}&`;
+            }
+        }
+        url = url.slice(0, -1);
+        console.log(url);
+        return url;
+    }
+}
+
 export default {
     name: "standardRegulationSimulationScenarioList", // 标准法规仿真场景
     components: { searchLayout, tableList },
@@ -119,27 +160,25 @@ export default {
         return {
             searchParams: {
                 //搜索参数
-                id: "", //ID
-                clientOrgName: "", //车辆名称
-                clientOrgName1: "", //配置名称
-                clientOrgName2: "", //配置描述
-                status: "",
-                c: [],
+                sceneName: "", //场景名称
+                regulationType: "", //法规类型
+                standardType: "", //标准类型
+                c:"" // 标签
             },
             list: [],
             columns: [
                 //表格列
                 {
                     label: "场景名称",
-                    prop: "id",
+                    prop: "sceneName",
                 },
                 {
                     label: "法规类型",
-                    prop: "aid1",
+                    prop: "regulationType",
                 },
                 {
                     label: "标准类型",
-                    prop: "ktName",
+                    prop: "standardType",
                 },
                 {
                     label: "标签",
@@ -150,7 +189,8 @@ export default {
                     label: "操作",
                     prop: "cgInfos",
                     template: true,
-                },
+                    // videoAddress
+                }
             ],
             pagination: {
                 //分页使用
@@ -162,21 +202,10 @@ export default {
             },
             getDataWay: {
                 //加载表格数据
-                dataType: "data",
+                dataType: "url",
                 type: "post",
-                firstRequest: false,
-                data: [
-                    {
-                        id: 1,
-                        ktName: "kjdhfkjsdhfkjsjhdfksdjhfkhwoieyrhfisdhfksjhdf",
-                        jbSource: "收到就好付款时间的回复可见收到货覅无痕",
-                    },
-                    { id: 2 },
-                    { id: 3 },
-                    { id: 4 },
-                    { id: 51 },
-                    { id: 6 },
-                ],
+                // firstRequest: false,
+                data: this.$api.sceneLibrary.queryStandardsRegulationsList,
                 param: {},
             },
             dialogVisible: false,
@@ -184,7 +213,16 @@ export default {
     },
     methods: {
         viewRow(row) {
-            this.dialogVisible = true;
+            // this.dialogVisible = true;
+
+            window.open(
+                getUrlParams(
+                    this.$api.sceneLibrary.download,
+                    {objectName:row.videoAddress },
+                    row.videoAddress
+                ),
+                "_target"
+            );
         },
     },
 

+ 3 - 15
src/views/sceneLibrary/trafficAccidentSimulationScenarioList.vue

@@ -223,22 +223,10 @@ export default {
             },
             getDataWay: {
                 //加载表格数据
-                dataType: "data",
+                dataType: "url",
                 type: "post",
-                firstRequest: false,
-                data: [
-                    {
-                        id: 1,
-                        ktName: "kjdhfkjsdhfkjsjhdfksdjhfkhwoieyrhfisdhfksjhdf",
-                        jbSource: "收到就好付款时间的回复可见收到货覅无痕",
-                    },
-                    { id: 2 },
-                    { id: 3 },
-                    { id: 4 },
-                    { id: 51 },
-                    { id: 6 },
-                ],
-                // data: this.$api.scientificStatistics.typeProjectStatistics,
+                // firstRequest: false,
+                data: this.$api.sceneLibrary.queryStandardsRegulationsList,
                 param: {},
             },
             dialogVisible: false,

+ 2 - 1
vue.config.js

@@ -79,7 +79,8 @@ module.exports = {
             '/simulation': {
                 // target: 'http://10.10.83.145:6888/user-center',
                 // target: 'http://10.15.12.70/simulation',
-                target: 'http://10.15.12.70:7001',
+                // target: 'http://10.15.12.70:7001', // 登录
+                target: 'http://10.15.12.73:7003',  // 王志强
                 changeOrigin: true,
                 secure: false, // 如果是https接口,需要配置这个参数
                 // pathRewrite: {