Browse Source

修改logo,添加授权认证类型

bihuisong 1 year ago
parent
commit
107cf27b1b

+ 10 - 7
authority-system/src/main/java/com/ruoyi/system/domain/dto/SysSecretProjectDTO.java

@@ -1,5 +1,6 @@
 package com.ruoyi.system.domain.dto;
 
+import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -56,7 +57,8 @@ public class SysSecretProjectDTO extends BaseEntity {
     /**
      * 授权认证类型(1:离线认证;2:在线认证;)
      */
-    private Long authorityType;
+    @Excel(name = "授权认证类型", readConverterExp = "1=离线认证,2=在线认证")
+    private String authorityType;
 
     public void setId(Long id) {
         this.id = id;
@@ -130,6 +132,13 @@ public class SysSecretProjectDTO extends BaseEntity {
         return value;
     }
 
+    public String getAuthorityType() {
+        return authorityType;
+    }
+
+    public void setAuthorityType(String authorityType) {
+        this.authorityType = authorityType;
+    }
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -146,11 +155,5 @@ public class SysSecretProjectDTO extends BaseEntity {
                 .toString();
     }
 
-    public Long getAuthorityType() {
-        return authorityType;
-    }
 
-    public void setAuthorityType(Long authorityType) {
-        this.authorityType = authorityType;
-    }
 }

+ 4 - 2
authority-system/src/main/resources/mapper/system/SysSecretProjectMapper.xml

@@ -42,7 +42,8 @@
         end statusText,
         ssp.status,
         ssp.is_switch,
-        secret_key
+        secret_key,
+        ssp.authority_type
         from sys_secret_project ssp
         left join sys_project sp on ssp.project_id = sp.id
         <where>
@@ -63,7 +64,8 @@
                    end statusText,
                ssp.status,
                ssp.is_switch,
-               secret_key
+               secret_key,
+               ssp.authority_type
         from sys_secret_project ssp
                  left join sys_project sp on ssp.project_id = sp.id
         where ssp.id = #{id}

BIN
authority-ui/src/assets/logo/logo.png


+ 16 - 3
authority-ui/src/views/authority/secret/index.vue

@@ -36,6 +36,11 @@
       <el-table-column label="状态" align="center" prop="statusText"/>
       <el-table-column label="过期时间" align="center" property="date" prop="overdueDate"/>
       <el-table-column label="标识码" align="center" prop="secretKey"/>
+      <el-table-column label="授权认证类型" align="center" prop="authorityType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.sys_is_status" :value="scope.row.authorityType"/>
+        </template>
+      </el-table-column>
       <el-table-column label="是否校验授权" align="center" prop="value">
         <template slot-scope="scope">
           <el-switch
@@ -158,11 +163,11 @@ import {
   updateIsSwitch,
   closeAuthority
 } from "@/api/system/secret";
-import {delProject, listAllProject} from "@/api/system/project";
+import {listAllProject} from "@/api/system/project";
 
 export default {
   name: "secret",
-  dicts:['sys_is_status'],
+  dicts: ['sys_is_status'],
   data() {
     return {
       // 遮罩层
@@ -199,7 +204,11 @@ export default {
       },
       value: true,
       // 表单校验
-      rules: {},
+      rules: {
+        authorityType: [{required: true, message: "授权认证类型不能为空", trigger: "change"}],
+        overdueDate: [{required: true, message: "过期时间不能为空", trigger: "change"}],
+        projectName: [{required: true, message: "项目名称不能为空", trigger: "change"}]
+      },
     };
   },
   created() {
@@ -207,6 +216,10 @@ export default {
     this.getProjectList()
   },
   methods: {
+    // 任务组名字典翻译
+    jobGroupFormat(row, column) {
+      return this.selectDictLabel(this.dict.type.sys_is_status, row.authorityType);
+    },
     handleClose(row) {
       let params = {
         id: row.id,