瀏覽代碼

Merge branch 'master' of http://10.15.12.70:3000/zhangliang/simulation-front

zhangliang2 3 年之前
父節點
當前提交
0ac842132c

+ 2 - 2
src/router/index.js

@@ -66,7 +66,7 @@ const routes = [{
         redirect: '/index',
         children: workManagement,
       },
-      /* {
+      {
         path: "/systemManagement",
         name: "systemManagement",
         meta: {
@@ -75,7 +75,7 @@ const routes = [{
         component: () => import("@/views/systemManagement/index"),
         redirect: '/index',
         children: systemManagement,
-      }, */
+      }, 
     ]
     .concat([{
       path: "*",

+ 9 - 0
src/router/systemManagement.js

@@ -16,4 +16,13 @@ export default [{
         },
         component: () => import("@/views/systemManagement/addAccount")
     },
+    {
+        path: "/parameterManagement",
+        name: "paramenterManagement",
+        meta: {
+            tabname: "参数管理",
+            menuKind: "paramenterManagement"
+        },
+        component: () => import("@/views/systemManagement/parameterManagement")    
+    }
 ]

+ 17 - 61
src/views/algorithmsLibrary/platformAlgorithmsList.vue

@@ -55,11 +55,10 @@
 
         <div class="myTabsBox myTabsBoxThreeTabs">
             <el-button
-                v-bind:class="{ addBtn: true, disabled: activeName === '1' }"
+                v-bind:class="{ addBtn: true}"
                 icon="el-icon-circle-plus-outline"
                 @click="addOne"
                 type="primary"
-                :disabled="activeName === '1'"
                 >新增</el-button
             >
         </div>
@@ -82,11 +81,10 @@ import searchLayout from "@/components/grid/searchLayout";
 import tableList from "@/components/grid/TableList";
 
 export default {
-    name: "algorithmsLibraryList", // 算法库列表
+    name: "algorithmsLibraryList", // 平台算法
     components: { searchLayout, tableList },
     data() {
         return {
-            activeName: "2",
             searchParams: {
                 //搜索参数
                 algorithmCode: "", // ID
@@ -96,6 +94,15 @@ export default {
                 uploadMode: "", // 私有类型
             },
             validationStatusList: [],
+            getDataWay:{
+
+                    //加载表格数据
+                    dataType: "url",
+                    type: "post",
+                    // firstRequest: false,
+                    data: this.$api.algorithmsLibrary.selectSharedAlgorithmList,
+                    param: {},
+            },
             columns: [
                 //表格列
                 {
@@ -126,42 +133,10 @@ export default {
         };
     },
     computed: {
-        getDataWay() {
-            if (this.activeName === "2" || this.activeName === "3") {
-                // 私有
-                return {
-                    //加载表格数据
-                    dataType: "url",
-                    type: "post",
-                    // firstRequest: false,
-                    data: this.$api.algorithmsLibrary.selectAlgorithmList,
-                    param: {},
-                };
-            } else {
-                // 公有
-                return {
-                    //加载表格数据
-                    dataType: "url",
-                    type: "post",
-                    // firstRequest: false,
-                    data: this.$api.algorithmsLibrary.selectSharedAlgorithmList,
-                    param: {},
-                };
-            }
-        },
+    
     },
     methods: {
         doSearch() {
-            if (this.activeName === "2") {
-                // 私有导入
-                this.searchParams.uploadMode = "1";
-            } else if (this.activeName === "3") {
-                // 私有仓库
-                this.searchParams.uploadMode = "2";
-            } else {
-                // 公有
-                this.searchParams.uploadMode = "";
-            }
             this.$nextTick(() => {
                 this.refreshList(this.searchParams);
             });
@@ -182,33 +157,11 @@ export default {
             };
             this.doSearch();
         },
-        pageControl(data) {
-            this.activeName = data.name;
-            this.doSearch();
-        },
         addOne() {
-            if (this.activeName === "2") {
-                // 私有导入
-                this.$router.push({ path: "/exportAlgorithms" });
-            } else {
-                // 私有仓库
-                this.$router.push({ path: "/gitAlgorithms" });
-            }
+            
         },
         editRow(row) {
-            if (row.uploadMode === "1") {
-                // 私有导入
-                this.$router.push({
-                    path: "/exportAlgorithms",
-                    query: { id: row.id, share: row.share },
-                });
-            } else {
-                // 私有仓库
-                this.$router.push({
-                    path: "/gitAlgorithms",
-                    query: { id: row.id, share: row.share },
-                });
-            }
+            
         },
         delOne(row) {
             this.$confirm("确认是否删除?", "提示", {
@@ -274,4 +227,7 @@ export default {
         top: 45px;
     }
 }
+.myTabsBox{
+    min-height:99px;
+}
 </style>

+ 3 - 0
src/views/page/pageMenu.vue

@@ -90,6 +90,9 @@
                         <el-menu-item index="algorithmsLibraryList"
                             >算法库列表</el-menu-item
                         >
+                        <el-menu-item index="platformAlgorithmsList"
+                            >算法平台</el-menu-item
+                        >
                     </el-submenu>
                     <el-submenu :index="menus[3]">
                         <template slot="title">

+ 169 - 0
src/views/systemManagement/parameterManagement.vue

@@ -0,0 +1,169 @@
+<template>
+    <div>
+        <search-layout :needBox="true">
+            <template slot="searchItem1">
+                <span class="label">账户名</span>
+                <el-input
+                    v-model="searchParams.algorithmCode"
+                    size="small"
+                    clearable
+                    placeholder="请输入"
+                    maxlength="60"
+                >
+                </el-input>
+            </template>
+
+            <template slot="searchBtn1">
+                <el-button type="primary" @click="doSearch">查询</el-button>
+            </template>
+            <template slot="searchBtn2">
+                <el-button type="primary" @click="doReset">重置</el-button>
+            </template>
+        </search-layout>
+
+        <div class="myTabsBox myTabsBoxThreeTabs">
+            <el-button
+                v-bind:class="{ addBtn: true}"
+                icon="el-icon-circle-plus-outline"
+                @click="addOne"
+                type="primary"
+                >新增参数配置</el-button
+            >
+        </div>
+
+        <tableList
+            ref="table"
+            style="margin: 0 30px"
+            :columns="columns"
+            :getDataWay="getDataWay"
+            :pagination="pagination"
+            index
+        >
+            <el-table-column label="操作" slot="cgInfos" align="center">
+                <template v-slot="scope">
+                    <i
+                        @click="editRow(scope.row)"
+                        class="el-icon-edit-outline elIcon"
+                        title="编辑"
+                    ></i>
+                    <i
+                        @click="delOne(scope.row)"
+                        class="el-icon-delete elIcon"
+                        title="删除"
+                    ></i>
+                </template>
+            </el-table-column>
+        </tableList>
+    </div>
+</template>
+
+<script>
+import searchLayout from "@/components/grid/searchLayout";
+import tableList from "@/components/grid/TableList";
+
+export default{
+    name: "parameterManagement",
+    components: { searchLayout, tableList },
+    data() {
+        return {
+            searchParams: {
+                //搜索参数
+                algorithmCode: "", // ID
+                algorithmName: "", // 算法名称
+                description: "", // 算法描述
+                validationStatus: "", // 校验状态
+                uploadMode: "", // 私有类型
+            },
+            validationStatusList: [],
+            getDataWay:{
+                dataType: "url",
+                type: "post",
+                // firstRequest: false,
+                data: this.$api.algorithmsLibrary.selectSharedAlgorithmList,
+                param: {},
+            },
+            columns: [
+                //表格列
+                {
+                    label: "账户名",
+                    prop: "algorithmCode",
+                },
+                {
+                    label: "可创建子账户数量",
+                    prop: "algorithmName",
+                },
+                {
+                    label: "最多可创建场景测试包数量",
+                    prop: "description",
+                },
+                {
+                    label: "场景数量包的最大场景数",
+                    prop: "validationStatus",
+                },
+                {
+                    label: "操作",
+                    prop: "cgInfos",
+                    template: true
+                }
+            ],
+            pagination: {
+                //分页使用
+                currentPage: 1,
+                pageSize: 10,
+                position: "right",
+                pageSizes: [10, 30, 50, 100, 200],
+                layout: "sizes, total, prev, pager, next, jumper",
+            },
+        };
+    },
+    methods: {
+        doSearch() {
+            this.$nextTick(() => {
+                this.refreshList(this.searchParams);
+            });
+        },
+        refreshList(param) {
+            param
+                ? this.$refs["table"].loadData(param)
+                : this.$refs["table"].loadData();
+        },
+        doReset() {
+            this.searchParams = {
+                
+            };
+            this.doSearch();
+        },
+        addOne() {
+            
+        },
+        editRow(row) {
+            
+        },
+        delOne(row) {
+            this.$confirm("确认是否删除?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            }).then(() => {
+                
+            });
+        },
+    },
+}
+</script>
+
+<style scoped lang="less">
+.tabsBox {
+    position: relative;
+    overflow: hidden;
+
+    .el-button {
+        position: absolute;
+        right: 40px;
+        top: 45px;
+    }
+}
+.myTabsBox{
+    min-height:99px;
+}
+</style>