zhangliang2 2 жил өмнө
parent
commit
5ae749d847

+ 0 - 1
src/axios/filter.js

@@ -105,7 +105,6 @@ Vue.prototype.$axios = axios; //定义调用方式
 
 
 
-
 // 针对上传大文件
 const instance = axios.create({
     baseURL: '',

+ 28 - 12
src/views/algorithmsLibrary/algorithmsLibraryList.vue

@@ -83,7 +83,10 @@
             <el-table-column label="操作" slot="cgInfos" align="center">
                 <template v-slot="scope">
                     <i
-                        v-if="activeName === '2' || activeName === '3'"
+                        v-if="
+                            (roleCode === '0' || roleCode === '1') &&
+                             (activeName === '2' || activeName === '3')
+                        "
                         @click="shareRow(scope.row)"
                         class="el-icon-share elIcon"
                         title="分享"
@@ -108,6 +111,7 @@
 <script>
 import searchLayout from "@/components/grid/searchLayout";
 import tableList from "@/components/grid/TableList";
+import { mapState } from "vuex";
 
 export default {
     name: "algorithmsLibraryList", // 算法库列表
@@ -159,6 +163,7 @@ export default {
         };
     },
     computed: {
+        ...mapState(["roleCode"]),
         getDataWay() {
             if (this.activeName === "2" || this.activeName === "3") {
                 // 私有
@@ -168,7 +173,10 @@ export default {
                     type: "post",
                     // firstRequest: false,
                     data: this.$api.algorithmsLibrary.selectAlgorithmList,
-                    param: this.activeName === "2"?{uploadMode: "1"}:{uploadMode: "2"},
+                    param:
+                        this.activeName === "2"
+                            ? { uploadMode: "1" }
+                            : { uploadMode: "2" },
                 };
             } else {
                 // 公有
@@ -183,11 +191,11 @@ export default {
             }
         },
     },
-    created(){
-        if(this.$route.query.activeName){
-            this.activeName = this.$route.query.activeName
+    created() {
+        if (this.$route.query.activeName) {
+            this.activeName = this.$route.query.activeName;
         }
-        this.$route.query.activeName = '2'
+        this.$route.query.activeName = "2";
     },
     methods: {
         doSearch() {
@@ -228,15 +236,15 @@ export default {
         addOne() {
             if (this.activeName === "2") {
                 // 私有导入
-                this.$router.push({ 
+                this.$router.push({
                     path: "/exportAlgorithms",
-                    query: {activeName: this.activeName}
+                    query: { activeName: this.activeName },
                 });
             } else {
                 // 私有仓库
-                this.$router.push({ 
+                this.$router.push({
                     path: "/gitAlgorithms",
-                    query: {activeName: this.activeName}
+                    query: { activeName: this.activeName },
                 });
             }
         },
@@ -245,13 +253,21 @@ export default {
                 // 私有导入
                 this.$router.push({
                     path: "/exportAlgorithms",
-                    query: { id: row.id, share: row.share, activeName: this.activeName },
+                    query: {
+                        id: row.id,
+                        share: row.share,
+                        activeName: this.activeName,
+                    },
                 });
             } else {
                 // 私有仓库
                 this.$router.push({
                     path: "/gitAlgorithms",
-                    query: { id: row.id, share: row.share, activeName: this.activeName },
+                    query: {
+                        id: row.id,
+                        share: row.share,
+                        activeName: this.activeName,
+                    },
                 });
             }
         },

+ 2 - 1
src/views/modelLibrary/sensorModel.vue

@@ -81,6 +81,7 @@
                 >
                 <el-button
                     type="primary"
+                    v-if="roleCode === '0' || roleCode === '1'"
                     v-show="currentShare === '0'"
                     @click="share"
                     >分享</el-button
@@ -141,7 +142,7 @@ export default {
     },
 
     computed: {
-        ...mapState(["configTitleList"]),
+        ...mapState(["configTitleList", "roleCode"]),
         subPageList() {
             return [
                 {

+ 6 - 1
src/views/modelLibrary/vehicleConfigurationList.vue

@@ -145,7 +145,10 @@
             <el-table-column label="操作" slot="cgInfos" align="center">
                 <template v-slot="scope">
                     <i
-                        v-if="activeName === '2'"
+                        v-if="
+                            (roleCode === '0' || roleCode === '1') &&
+                            activeName === '2'
+                        "
                         @click="shareRow(scope.row)"
                         class="el-icon-share elIcon"
                         title="分享"
@@ -171,6 +174,7 @@
 import searchLayout from "@/components/grid/searchLayout";
 import tableList from "@/components/grid/TableList";
 import toolbarTab from "@/components/toolbar/toolbarTab";
+import { mapState } from "vuex";
 
 export default {
     name: "vehicleConfigurationList", // 车辆配置
@@ -239,6 +243,7 @@ export default {
             },
         };
     },
+    computed: { ...mapState(["roleCode"]) },
     methods: {
         pageControl(data) {
             this.activeName = data.name;

+ 2 - 1
src/views/modelLibrary/vehicleModel.vue

@@ -277,6 +277,7 @@
                 >
                 <el-button
                     type="primary"
+                    v-if="roleCode === '0' || roleCode === '1'"
                     v-show="form.share === '0'"
                     @click="share"
                     >分享</el-button
@@ -539,7 +540,7 @@ export default {
     },
 
     computed: {
-        ...mapState(["fileHost", "fileUrl"]),
+        ...mapState(["fileHost", "fileUrl", "roleCode"]),
     },
 
     methods: {

+ 6 - 1
src/views/sceneLibrary/gradingRulesList.vue

@@ -98,7 +98,10 @@
             >
                 <template v-slot="scope">
                     <i
-                        v-if="activeName === '2'"
+                        v-if="
+                            (roleCode === '0' || roleCode === '1') &&
+                            activeName === '2'
+                        "
                         @click="shareRow(scope.row)"
                         class="el-icon-share elIcon"
                         title="分享"
@@ -124,6 +127,7 @@
 import searchLayout from "@/components/grid/searchLayout";
 import tableList from "@/components/grid/TableList";
 import toolbarTab from "@/components/toolbar/toolbarTab";
+import { mapState } from "vuex";
 
 export default {
     name: "gradingRulesList", // 评分规则列表
@@ -187,6 +191,7 @@ export default {
             dialogVisible: false,
         };
     },
+    computed: { ...mapState(["roleCode"]) },
     methods: {
         doSearch() {
             if (this.searchDate) {

+ 12 - 7
src/views/sceneLibrary/scenarioTestPackageManagementList.vue

@@ -73,7 +73,10 @@
             <el-table-column label="操作" slot="cgInfos" align="center">
                 <template v-slot="scope">
                     <i
-                        v-if="activeName === '2'"
+                        v-if="
+                            (roleCode === '0' || roleCode === '1') &&
+                            activeName === '2'
+                        "
                         @click="shareRow(scope.row)"
                         class="el-icon-share elIcon"
                         title="分享"
@@ -99,6 +102,7 @@
 import searchLayout from "@/components/grid/searchLayout";
 import tableList from "@/components/grid/TableList";
 import toolbarTab from "@/components/toolbar/toolbarTab";
+import { mapState } from "vuex";
 
 export default {
     name: "scenarioTestPackageManagementList", // 场景测试包管理
@@ -162,6 +166,7 @@ export default {
             createdPackageCount: 0, // 已创建的场景包数量
         };
     },
+    computed: { ...mapState(["roleCode"]) },
     methods: {
         doSearch() {
             if (this.searchDate) {
@@ -201,7 +206,9 @@ export default {
             this.activeName = data.name;
             this.doSearch();
         },
-        addConfig() {
+        async addConfig() {
+            await this.getCount();
+
             if (this.createdPackageCount >= this.maxPackageCount) {
                 this.$message.error("已达到测试包创建数量上限");
                 return;
@@ -259,8 +266,8 @@ export default {
                 query: { packageId: row.packageId, share: row.share },
             });
         },
-        getCount() {
-            this.$axios({
+        async getCount() {
+            await this.$axios({
                 method: "post",
                 url: this.$api.sceneLibrary.getSceneParam,
                 data: {},
@@ -274,9 +281,7 @@ export default {
             });
         },
     },
-    mounted() {
-        this.getCount();
-    },
+    mounted() {},
 };
 </script>
 

+ 9 - 0
src/views/sceneLibrary/scenePacketList.vue

@@ -512,6 +512,8 @@ export default {
                 if (this.curNode.children && this.curNode.children.length > 0) {
                     node = this.curNode.children[0];
                 } else {
+                    // 解决删除该节点前,其父节点只有一个孩子时,场景数量还会存在的问题
+                    this.curNode.sceneNum = 0;
                     node = this.curNode;
                 }
 
@@ -800,12 +802,16 @@ export default {
         },
         // 泛化-取消
         generalizationCancel() {
+            this.$refs.formA.resetFields();
+            this.formA.ruleName = "";
+            this.formA.rulesId = "";
             this.generalizationVisible = false;
         },
         // 开始泛化
         generalizationBegin() {
             this.generalizationCancel();
             this.curNode.sceneNum = "泛化中";
+            this.curNode = {};
         },
         // 泛化完成回调
         generalizationDone(info, obj, isSuccess = true) {
@@ -830,6 +836,9 @@ export default {
                     node.sceneGeneralizationIds = "";
                     node.sceneNum = 0;
                     node.templateId = "";
+
+                    node.packageAndRules = "";
+                    node.ruleName = "";
                 }
 
                 // 清空真实场景的数据

+ 5 - 3
src/views/systemManagement/scenePacketDistributionDetail.vue

@@ -238,9 +238,11 @@ export default {
         selectedShow() {
             this.doSearch();
         },
-        showNums() {
+        showNums(fromBtn = true) {
             if (this.checkedNames.length === 0) {
-                this.$message.error("请先选择场景包");
+                if (fromBtn) {
+                    this.$message.error("请先选择场景包");
+                }
                 this.zrSceneNames = 0;
                 this.bzSceneNames = 0;
                 this.jtSceneNames = 0;
@@ -329,7 +331,7 @@ export default {
                     this.info = res.info;
                     this.checkedNames = res.info.packageNames || [];
                     this.loadedCallBack();
-                    this.showNums();
+                    this.showNums(false);
                 } else {
                     this.$message.error(res.message || "获取信息失败");
                 }

+ 2 - 0
src/views/systemManagement/scenePacketListManagement/generalizationList.vue

@@ -72,6 +72,8 @@
             :getDataWay="getDataWay"
             :pagination="pagination"
             :checkedData="checkedArr"
+            :needLoadedCallBack="true"
+            :loadedCallBack="loadedCallBack"
             :needSelectedCallBack="true"
             :selectedCallBack="selectedCallBack"
             :selectedAllCallBack="selectedAllCallBack"

+ 2 - 0
src/views/systemManagement/scenePacketListManagement/naturalDrivingList.vue

@@ -101,6 +101,8 @@
             :getDataWay="getDataWay"
             :pagination="pagination"
             :checkedData="checkedArr"
+            :needLoadedCallBack="true"
+            :loadedCallBack="loadedCallBack"
             :needSelectedCallBack="true"
             :selectedCallBack="selectedCallBack"
             :selectedAllCallBack="selectedAllCallBack"

+ 2 - 0
src/views/systemManagement/scenePacketListManagement/standardRegulationSimulationList.vue

@@ -59,6 +59,8 @@
             :getDataWay="getDataWay"
             :pagination="pagination"
             :checkedData="checkedArr"
+            :needLoadedCallBack="true"
+            :loadedCallBack="loadedCallBack"
             :needSelectedCallBack="true"
             :selectedCallBack="selectedCallBack"
             :selectedAllCallBack="selectedAllCallBack"

+ 2 - 0
src/views/systemManagement/scenePacketListManagement/trafficAccidentSimulationList.vue

@@ -106,6 +106,8 @@
             :getDataWay="getDataWay"
             :pagination="pagination"
             :checkedData="checkedArr"
+            :needLoadedCallBack="true"
+            :loadedCallBack="loadedCallBack"
             :needSelectedCallBack="true"
             :selectedCallBack="selectedCallBack"
             :selectedAllCallBack="selectedAllCallBack"

+ 4 - 1
src/views/systemManagement/systemLogManagement.vue

@@ -141,7 +141,6 @@ export default {
 
     methods: {
         doSearch() {
-            console.log(this.operation);
             if (this.createDate) {
                 this.searchParams.createTimeBegin = `${this.createDate[0]}`;
                 this.searchParams.createTimeEnd = `${this.createDate[1]}`;
@@ -152,9 +151,13 @@ export default {
 
             if (this.operation.length === 1) {
                 this.searchParams.module = this.operation[0];
+                this.searchParams.operationType = "";
             } else if (this.operation.length === 2) {
                 this.searchParams.module = this.operation[0];
                 this.searchParams.operationType = this.operation[1];
+            } else {
+                this.searchParams.module = "";
+                this.searchParams.operationType = "";
             }
 
             let pageMap = {

+ 4 - 4
vue.config.js

@@ -88,8 +88,8 @@ module.exports = {
                 // target: 'http://10.10.83.145:6888/user-center',
                 // target: 'http://10.12.10.70/simulation',
                 // target: 'http://10.12.10.70:7001', // 登录
-                target: 'http://10.12.10.73:7003',  // 王志强
-                // target: 'http://10.12.10.70', // windowstest
+                // target: 'http://10.12.10.73:7003',  // 王志强
+                target: 'http://10.12.10.70', // windowstest
                 // target: 'http://10.12.10.87:8001',  // 赵艳
                 // target: 'http://10.12.10.72:8001',  // 王晓峰
                 // target: 'http://192.168.30.75',  // gq
@@ -103,11 +103,11 @@ module.exports = {
                 }
             },
             '/simulation/resource/server': {
-                target: 'http://10.12.10.73:7003', // 王志强
+                // target: 'http://10.12.10.73:7003', // 王志强
                 // target: 'http://10.12.10.88:7003', // 王耀栋
                 // target: 'http://10.12.10.72:7003',  // 王晓峰
                 // target: 'http://10.12.10.87:7003',  // 赵艳
-                // target: 'http://10.12.10.70',  // windowstest
+                target: 'http://10.12.10.70',  // windowstest
                 // target: 'http://192.168.30.75',  // gq
                 // target: 'http://47.94.105.148',  // aliyun
                 // target: 'http://47.93.217.159',  // aliyun-dev