浏览代码

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

zhangliang2 2 年之前
父节点
当前提交
d9bdc1136d

+ 6 - 1
src/api/systemManagement.js

@@ -46,6 +46,9 @@ const getLoginLogPageList = basePart + '/log/getLoginLogPageList' // 登录列
 const getOperationLogPageList = basePart + '/log/getOperationLogPageList' // 操作列表
 const getSystemLogPageList = basePart + '/log/getSystemLogPageList' // 系统列表
 
+//字典管理
+const refreshDictsByTypes = basePart + '/dict/refreshDictsByTypes' // 刷新字典
+
 
 export default {
     getUserPageList,
@@ -84,5 +87,7 @@ export default {
 
     getLoginLogPageList,
     getOperationLogPageList,
-    getSystemLogPageList
+    getSystemLogPageList,
+
+    refreshDictsByTypes
 }

+ 10 - 0
src/router/systemManagement.js

@@ -177,4 +177,14 @@ export default [{
         },
         component: () => import("@/views/systemManagement/systemLogManagement")
     }
+    ,
+    {
+        path: "/dictManagement",
+        name: "dictManagement",
+        meta: {
+            tabname: "日志管理",
+            menuKind: "dictManagement"
+        },
+        component: () => import("@/views/systemManagement/dictManagement")
+    }
 ]

+ 12 - 4
src/views/systemManagement/clusteringManagement.vue

@@ -56,8 +56,12 @@
         </div>-->
 
         <div style="border-top: none; margin: 30px 40px 10px 40px">
-            <span>仿真软件已分配未到期节点数量:{{totalSimulation}}</span>
-            <span style="margin-left: 20%">动力学软件已分配未到期节点数量:{{totalDynamic}}</span>
+            <span>仿真软件已分配未到期节点数量:{{totalSimulation}}
+                <span v-if = " totalSimulationAll && totalSimulationAll >= 0"> / {{totalSimulationAll}}</span>
+            </span>
+            <span style="margin-left: 20%">动力学软件已分配未到期节点数量:{{totalDynamic}}
+                <span v-if = " totalDynamicAll && totalDynamicAll >= 0"> / {{totalDynamicAll}}</span>
+            </span>
         </div>
         <tableList
             ref="table"
@@ -107,7 +111,9 @@ export default {
             dueTimeRange:[],
             list: [],
             totalSimulation:0,
+            totalSimulationAll:-1,
             totalDynamic:0,
+            totalDynamicAll:-1,
             useTypeList:[],
             columns: [
                 //表格列
@@ -172,8 +178,10 @@ export default {
             data:{}
         }).then(res=>{
             if(res.code=='200'){
-                this.totalSimulation=res.info.totalSimulation
-                this.totalDynamic=res.info.totalDynamic
+                this.totalSimulation=res.info.totalSimulation;
+                this.totalSimulationAll=res.info.totalSimulationAll;
+                this.totalDynamic=res.info.totalDynamic;
+                this.totalDynamicAll=res.info.totalDynamicAll;
             }
         })
     },

+ 95 - 0
src/views/systemManagement/dictManagement.vue

@@ -0,0 +1,95 @@
+<template>
+    <div>
+        <el-form
+            ref="form"
+            :model="form"
+            :rules="rules"
+            label-width="220px"
+            class="flexBox"
+        >
+            <div class="formItemBox">
+                <el-form-item label="字典类型:" prop="dictTypes">
+                    <el-input
+                        placeholder="请输入,多个字典类型用英文逗号隔开"
+                        v-autoTrim="{ obj: form, key: 'dictTypes' }"
+                        v-model="form.dictTypes"
+                    >
+                    </el-input>
+                </el-form-item>
+                <el-form-item label="刷新结果:" prop="info">
+                    {{form.info}}
+                </el-form-item>
+            </div>
+        </el-form>
+        <div class="btns">
+            <el-button type="primary" @click="refresh">刷新</el-button>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "dictManagement",
+    components: {},
+    data() {
+        return {
+            form: {
+                dictTypes:"",
+                info: ""
+            },
+            rules: {
+                dictTypes:  [{ required: true, message: "请输入", trigger: "blur" }]
+            }
+        };
+    },
+    methods: {
+        refresh(){
+            this.$refs.form.validate((valid) => {
+                if(valid){
+                    this.$axios({
+                    method:'POST',
+                    url:this.$api.systemManagement.refreshDictsByTypes,
+                    data:{
+                        ...this.form
+                    }
+                    }).then(res => {
+                        if(res.code == 200){
+                            this.$message.success("刷新成功");
+                            this.form.info = res.info;
+                        }else{
+                            this.$message.error(res.message || "刷新失败");
+                        }
+                    })
+                }
+            })
+        }
+    },
+};
+</script>
+
+<style lang="less" scoped>
+.el-form {
+    width: 60%;
+    min-width: 900px;
+    padding-top: 60px;
+    margin: 0 auto;
+
+    .formItemBox {
+        flex: 1;
+
+        /deep/ .el-input,
+        .el-select {
+            width: 100%;
+        }
+    }
+}
+
+.btns {
+    padding-top: 30px;
+    text-align: center;
+}
+/deep/ input::-webkit-outer-spin-button,
+/deep/ input::-webkit-inner-spin-button {
+  -webkit-appearance: none !important;
+}
+</style>

+ 10 - 3
src/views/systemManagement/loginLogManagement.vue

@@ -2,7 +2,7 @@
     <div>
         <search-layout :needBox="true">
             <template slot="searchItem1">
-                <span class="label">操作账户</span>
+                <span class="label">账户名称</span>
                 <el-input
                     v-model="searchParams.username"
                     size="small"
@@ -13,7 +13,7 @@
                 </el-input>
             </template>
             <template slot="searchItem2">
-                <span class="label">操作时间</span>
+                <span class="label">登录时间</span>
                 <el-date-picker
                     v-model="createDate"
                     type="daterange"
@@ -72,7 +72,14 @@ export default {
                     prop: "ip",
                 },
                 {
-                    label: "操作时间",
+                    label: "登录状态",
+                    prop: "state",
+                    formatter: (data)=>{
+                        return data.state == 1 ? "成功" : "失败";
+                    }
+                },
+                {
+                    label: "登录时间",
                     prop: "createTime",
                 },
             ],