Browse Source

修改接口

zs 1 year ago
parent
commit
bdba914068

+ 0 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/MatchActivityController.java

@@ -37,7 +37,6 @@ public class MatchActivityController extends BaseController
     /**
      * 查询训练/活动列表
      */
-    @PreAuthorize("@ss.hasPermi('system:activity:list')")
     @GetMapping("/list")
     public TableDataInfo list(MatchActivity matchActivity)
     {

+ 0 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/MatchGameController.java

@@ -37,7 +37,6 @@ public class MatchGameController extends BaseController
     /**
      * 查询赛事列表
      */
-    @PreAuthorize("@ss.hasPermi('system:game:list')")
     @GetMapping("/list")
     public TableDataInfo list(MatchGame matchGame)
     {

+ 0 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/MatchMatchconfigController.java

@@ -72,11 +72,9 @@ public class MatchMatchconfigController extends BaseController
     /**
      * 获取数据库一条数据
      */
-    @PreAuthorize("@ss.hasPermi('system:matchconfig:findOne')")
     @GetMapping(value = "/findOne")
     public AjaxResult findOne()
     {
-        matchMatchconfigService.selectfindOne();
         return success(matchMatchconfigService.selectfindOne());
     }
 

+ 0 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/MatchTeamController.java

@@ -37,7 +37,6 @@ public class MatchTeamController extends BaseController
     /**
      * 查询球队列表
      */
-    @PreAuthorize("@ss.hasPermi('system:team:list')")
     @GetMapping("/list")
     public TableDataInfo list(MatchTeam matchTeam)
     {
@@ -62,7 +61,6 @@ public class MatchTeamController extends BaseController
     /**
      * 获取球队详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:team:query')")
     @GetMapping(value = "/{Id}")
     public AjaxResult getInfo(@PathVariable("Id") Long Id)
     {
@@ -72,7 +70,6 @@ public class MatchTeamController extends BaseController
     /**
      * 新增球队
      */
-    @PreAuthorize("@ss.hasPermi('system:team:add')")
     @Log(title = "球队", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody MatchTeam matchTeam)

+ 7 - 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/MatchUserController.java

@@ -1,17 +1,14 @@
 package com.ruoyi.web.controller.system;
 
+import java.util.ArrayList;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -73,9 +70,8 @@ public class MatchUserController extends BaseController
     /**
      * 通过openid获取用户详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:matchUser:openid')")
-    @GetMapping(value = "/find/{openid}")
-    public AjaxResult getOpenid(@PathVariable("openid") String openid)
+    @GetMapping(value = "/find")
+    public AjaxResult getOpenid(@RequestParam(value = "openid") String openid)
     {
         return success(matchUserService.selectOpenid(openid));
     }
@@ -83,7 +79,6 @@ public class MatchUserController extends BaseController
     /**
      * 新增代码生成用户字段
      */
-    @PreAuthorize("@ss.hasPermi('system:matchUser:add')")
     @Log(title = "代码生成用户字段", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody MatchUser matchUser)
@@ -94,7 +89,6 @@ public class MatchUserController extends BaseController
     /**
      * 修改代码生成用户字段
      */
-    @PreAuthorize("@ss.hasPermi('system:matchUser:edit')")
     @Log(title = "代码生成用户字段", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody MatchUser matchUser)

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java

@@ -40,7 +40,7 @@ public class SysDictDataController extends BaseController
     @Autowired
     private ISysDictTypeService dictTypeService;
 
-    @PreAuthorize("@ss.hasPermi('system:dict:list')")
+//    @PreAuthorize("@ss.hasPermi('system:dict:list')")
     @GetMapping("/list")
     public TableDataInfo list(SysDictData dictData)
     {

+ 8 - 8
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -22,7 +22,7 @@ import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
 
 /**
  * spring security配置
- * 
+ *
  * @author ruoyi
  */
 @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
@@ -33,7 +33,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
      */
     @Autowired
     private UserDetailsService userDetailsService;
-    
+
     /**
      * 认证失败处理类
      */
@@ -51,7 +51,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
      */
     @Autowired
     private JwtAuthenticationTokenFilter authenticationTokenFilter;
-    
+
     /**
      * 跨域过滤器
      */
@@ -115,12 +115,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 // 静态资源,可匿名访问
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
-//                .antMatchers("/system/matchconfig/**").anonymous()
-                .antMatchers("/system/matchconfig/**").permitAll()
-        // 除上面外的所有请求全部需要鉴权认证
+                // 对于小程序登录接口 允许匿名访问
+                .antMatchers("/system/matchconfig/**","/system/team/**","/system/activity/**","/system/game/**", "/system/matchUser/**","/system/dict/data/**","/common/**").permitAll()
+                // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()
-            .and()
-            .headers().frameOptions().disable();
+                .and()
+                .headers().frameOptions().disable();
         // 添加Logout filter
         httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
         // 添加JWT filter

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/MatchMatchconfig.java

@@ -1,5 +1,6 @@
 package com.ruoyi.system.domain;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -11,6 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2023-11-09
  */
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class MatchMatchconfig extends BaseEntity
 {
     private static final long serialVersionUID = 1L;

+ 9 - 28
ruoyi-system/src/main/java/com/ruoyi/system/domain/MatchTeam.java

@@ -1,5 +1,6 @@
 package com.ruoyi.system.domain;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -11,6 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2023-11-08
  */
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class MatchTeam extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -42,13 +44,9 @@ public class MatchTeam extends BaseEntity
     @Excel(name = "城市")
     private String city;
 
-    /** 地区 */
-    @Excel(name = "地区")
-    private String area;
-
     /** 颜色 */
     @Excel(name = "颜色")
-    private String red;
+    private String color;
 
     /** 成员 */
     @Excel(name = "成员")
@@ -121,27 +119,15 @@ public class MatchTeam extends BaseEntity
         this.city = city;
     }
 
-    public String getCity() 
-    {
-        return city;
-    }
-    public void setArea(String area) 
-    {
-        this.area = area;
-    }
-
-    public String getArea() 
-    {
-        return area;
-    }
-    public void setRed(String red) 
+    public String getCity() { return city; }
+    public void setColor(String color)
     {
-        this.red = red;
+        this.color = color;
     }
 
-    public String getRed() 
+    public String getColor()
     {
-        return red;
+        return color;
     }
     public void setMember(String member) 
     {
@@ -181,15 +167,10 @@ public class MatchTeam extends BaseEntity
             .append("type", getType())
             .append("trainType", getTrainType())
             .append("city", getCity())
-            .append("area", getArea())
-            .append("red", getRed())
+            .append("color", getColor())
             .append("member", getMember())
             .append("brief", getBrief())
             .append("isUse", getIsUse())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
             .toString();
     }
 }

+ 4 - 15
ruoyi-system/src/main/java/com/ruoyi/system/domain/MatchUser.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.domain;
 
 import java.math.BigDecimal;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -12,6 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2023-11-08
  */
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class MatchUser extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -47,10 +50,6 @@ public class MatchUser extends BaseEntity
     @Excel(name = "城市")
     private String city;
 
-    /** 地区 */
-    @Excel(name = "地区")
-    private String area;
-
     /** 身高 */
     @Excel(name = "身高")
     private BigDecimal height;
@@ -143,16 +142,7 @@ public class MatchUser extends BaseEntity
     {
         return phone;
     }
-    public void setArea(String area) 
-    {
-        this.area = area;
-    }
-
-    public String getArea() 
-    {
-        return area;
-    }
-    public void setHeight(BigDecimal height) 
+    public void setHeight(BigDecimal height)
     {
         this.height = height;
     }
@@ -209,7 +199,6 @@ public class MatchUser extends BaseEntity
             .append("sex", getSex())
             .append("phone", getPhone())
             .append("city", getCity())
-            .append("area", getArea())
             .append("height", getHeight())
             .append("weight", getWeight())
             .append("type", getType())

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MatchUserServiceImpl.java

@@ -35,7 +35,7 @@ public class MatchUserServiceImpl implements IMatchUserService
     /**
      * 通过openid查询用户详情
      *
-     * @param openid openid字段
+     * @param openid 代码生成用户字段
      * @return 代码生成用户字段
      */
     @Override

+ 6 - 27
ruoyi-system/src/main/resources/mapper/system/MatchTeamMapper.xml

@@ -12,19 +12,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="type"    column="type"    />
         <result property="trainType"    column="train_type"    />
         <result property="city"    column="city"    />
-        <result property="area"    column="area"    />
-        <result property="red"    column="red"    />
+        <result property="color"    column="color"    />
         <result property="member"    column="member"    />
         <result property="brief"    column="brief"    />
         <result property="isUse"    column="is_use"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
     </resultMap>
 
     <sql id="selectMatchTeamVo">
-        select _id, user_id, logo, name, type, train_type, city, area, red, member, brief, is_use, create_by, create_time, update_by, update_time from match_team
+        select _id, user_id, logo, name, type, train_type, city, color, member, brief, is_use from match_team
     </sql>
 
     <select id="selectMatchTeamList" parameterType="MatchTeam" resultMap="MatchTeamResult">
@@ -36,8 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="type != null  and type != ''"> and type = #{type}</if>
             <if test="trainType != null  and trainType != ''"> and train_type = #{trainType}</if>
             <if test="city != null  and city != ''"> and city = #{city}</if>
-            <if test="area != null  and area != ''"> and area = #{area}</if>
-            <if test="red != null  and red != ''"> and red = #{red}</if>
+            <if test="color != null  and color != ''"> and color = #{color}</if>
             <if test="member != null  and member != ''"> and member = #{member}</if>
             <if test="brief != null  and brief != ''"> and brief = #{brief}</if>
             <if test="isUse != null  and isUse != ''"> and is_use = #{isUse}</if>
@@ -58,15 +52,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="type != null">type,</if>
             <if test="trainType != null">train_type,</if>
             <if test="city != null">city,</if>
-            <if test="area != null">area,</if>
-            <if test="red != null">red,</if>
+            <if test="color != null">color,</if>
             <if test="member != null">member,</if>
             <if test="brief != null">brief,</if>
             <if test="isUse != null">is_use,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="userId != null">#{userId},</if>
@@ -75,15 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="type != null">#{type},</if>
             <if test="trainType != null">#{trainType},</if>
             <if test="city != null">#{city},</if>
-            <if test="area != null">#{area},</if>
-            <if test="red != null">#{red},</if>
+            <if test="color != null">#{color},</if>
             <if test="member != null">#{member},</if>
             <if test="brief != null">#{brief},</if>
             <if test="isUse != null">#{isUse},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
          </trim>
     </insert>
 
@@ -96,15 +80,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="type != null">type = #{type},</if>
             <if test="trainType != null">train_type = #{trainType},</if>
             <if test="city != null">city = #{city},</if>
-            <if test="area != null">area = #{area},</if>
-            <if test="red != null">red = #{red},</if>
+            <if test="color != null">color = #{color},</if>
             <if test="member != null">member = #{member},</if>
             <if test="brief != null">brief = #{brief},</if>
             <if test="isUse != null">is_use = #{isUse},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
         </trim>
         where _id = #{Id}
     </update>

+ 3 - 8
ruoyi-system/src/main/resources/mapper/system/MatchUserMapper.xml

@@ -13,7 +13,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="sex"    column="sex"    />
         <result property="phone"    column="phone"    />
         <result property="city"    column="city"    />
-        <result property="area"    column="area"    />
         <result property="height"    column="height"    />
         <result property="weight"    column="weight"    />
         <result property="type"    column="type"    />
@@ -22,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectMatchUserVo">
-        select _id, openid, icon, name, nickname, phone, sex, city, area, height, weight, type, ball_years, place from match_user
+        select _id, openid, icon, name, nickname, phone, sex, city, height, weight, type, ball_years, place from match_user
     </sql>
 
     <select id="selectMatchUserList" parameterType="MatchUser" resultMap="MatchUserResult">
@@ -35,7 +34,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
             <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
             <if test="city != null  and city != ''"> and city = #{city}</if>
-            <if test="area != null  and area != ''"> and area = #{area}</if>
             <if test="height != null "> and height = #{height}</if>
             <if test="weight != null "> and weight = #{weight}</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
@@ -51,8 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="selectOpenid" parameterType="String" resultMap="MatchUserResult">
-        <include refid="selectMatchUserVo"/>
-        where openid = #{openid} LIMIT 1
+        select * from match_user
+        where openid = #{openid}
     </select>
         
     <insert id="insertMatchUser" parameterType="MatchUser" useGeneratedKeys="true" keyProperty="Id">
@@ -65,7 +63,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sex != null">sex,</if>
             <if test="phone != null">phone,</if>
             <if test="city != null">city,</if>
-            <if test="area != null">area,</if>
             <if test="height != null">height,</if>
             <if test="weight != null">weight,</if>
             <if test="type != null">type,</if>
@@ -80,7 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sex != null">#{sex},</if>
             <if test="phone != null">phone,</if>
             <if test="city != null">#{city},</if>
-            <if test="area != null">#{area},</if>
             <if test="height != null">#{height},</if>
             <if test="weight != null">#{weight},</if>
             <if test="type != null">#{type},</if>
@@ -99,7 +95,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sex != null">sex = #{sex},</if>
             <if test="phone != null">phone = #{phone},</if>
             <if test="city != null">city = #{city},</if>
-            <if test="area != null">area = #{area},</if>
             <if test="height != null">height = #{height},</if>
             <if test="weight != null">weight = #{weight},</if>
             <if test="type != null">type = #{type},</if>

+ 44 - 44
ruoyi-ui/src/api/system/team.js

@@ -1,44 +1,44 @@
-import request from '@/utils/request'
-
-// 查询球队列表
-export function listTeam(query) {
-  return request({
-    url: '/system/team/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询球队详细
-export function getTeam(Id) {
-  return request({
-    url: '/system/team/' + Id,
-    method: 'get'
-  })
-}
-
-// 新增球队
-export function addTeam(data) {
-  return request({
-    url: '/system/team',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改球队
-export function updateTeam(data) {
-  return request({
-    url: '/system/team',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除球队
-export function delTeam(Id) {
-  return request({
-    url: '/system/team/' + Id,
-    method: 'delete'
-  })
-}
+import request from '@/utils/request'
+
+// 查询球队列表
+export function listTeam(query) {
+  return request({
+    url: '/system/team/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询球队详细
+export function getTeam(Id) {
+  return request({
+    url: '/system/team/' + Id,
+    method: 'get'
+  })
+}
+
+// 新增球队
+export function addTeam(data) {
+  return request({
+    url: '/system/team',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改球队
+export function updateTeam(data) {
+  return request({
+    url: '/system/team',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除球队
+export function delTeam(Id) {
+  return request({
+    url: '/system/team/' + Id,
+    method: 'delete'
+  })
+}

+ 13 - 0
ruoyi-ui/src/views/login.vue

@@ -175,12 +175,25 @@ export default {
   background: #ffffff;
   width: 400px;
   padding: 25px 25px 5px 25px;
+
   .el-input {
     height: 38px;
     input {
       height: 38px;
     }
   }
+  .el-form-item__content {
+    display: flex;
+    justify-content: space-between;
+    .login-code {
+      width: 120px;
+      height: 40px;
+      .login-code-img {
+        width: 100%;
+        height: 100%;
+      }
+    }
+  }
   .input-icon {
     height: 39px;
     width: 14px;

+ 64 - 40
ruoyi-ui/src/views/system/matchUser/index.vue

@@ -17,8 +17,8 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="用户性别" prop="sex">
-        <el-select v-model="queryParams.sex" placeholder="用户性别" clearable>
+      <el-form-item label="性别" prop="sex">
+        <el-select v-model="queryParams.sex" placeholder="性别" clearable>
           <el-option
             v-for="dict in dict.type.sys_user_sex"
             :key="dict.value"
@@ -27,18 +27,18 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="城市" prop="city">
+      <el-form-item label="电话号" prop="phone">
         <el-input
-          v-model="queryParams.city"
-          placeholder="请输入城市"
+          v-model="queryParams.phone"
+          placeholder="请输入电话号"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="地区" prop="area">
+      <el-form-item label="城市" prop="city">
         <el-input
-          v-model="queryParams.area"
-          placeholder="请输入地区"
+          v-model="queryParams.city"
+          placeholder="请输入城市"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -68,18 +68,28 @@
       <el-table-column label="openid" align="center" prop="openid" />
       <el-table-column label="姓名" align="center" prop="name" />
       <el-table-column label="昵称" align="center" prop="nickname" />
-      <el-table-column label="用户性别" align="center" prop="sex" >
+      <el-table-column label="性别" align="center" prop="sex" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
         </template>
       </el-table-column>
+      <el-table-column label="电话号" align="center" prop="phone" />
       <el-table-column label="城市" align="center" prop="city" />
-      <el-table-column label="地区" align="center" prop="area" />
-      <el-table-column label="身高" align="center" prop="height" />
-      <el-table-column label="体重" align="center" prop="weight" />
-      <el-table-column label="主要项目" align="center" prop="type" />
-      <el-table-column label="球龄" align="center" prop="ballYears" />
-      <el-table-column label="队内位置" align="center" prop="place" />
+      <el-table-column label="主要项目" align="center" prop="type" >
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.sys_user_type" :value="scope.row.type"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="球龄" align="center" prop="ballYears" >
+      <template slot-scope="scope">
+        <dict-tag :options="dict.type.sys_user_year" :value="scope.row.ballYears"/>
+      </template>
+      </el-table-column>
+      <el-table-column label="队内位置" align="center" prop="place" >
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.sys_user_place" :value="scope.row.place"/>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -100,24 +110,23 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
     <!-- 添加或修改代码生成用户字段对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px" :disabled="true">
-        <el-form-item label="openid" prop="openid">
-          <el-input v-model="form.openid" placeholder="请输入openid" />
-        </el-form-item>
         <el-form-item label="头像" prop="icon">
           <el-avatar shape="square" size="large" :src="form.icon"></el-avatar>
         </el-form-item>
+        <el-form-item label="openid" prop="openid">
+          <el-input v-model="form.openid" placeholder="请输入openid" />
+        </el-form-item>
         <el-form-item label="姓名" prop="name">
           <el-input v-model="form.name" placeholder="请输入姓名" />
         </el-form-item>
         <el-form-item label="昵称" prop="nickname">
           <el-input v-model="form.nickname" placeholder="请输入昵称" />
         </el-form-item>
-        <el-form-item label="用户性别" prop="sex">
-          <el-radio-group v-model="form.status">
+        <el-form-item label="性别" prop="sex">
+          <el-radio-group v-model="form.sex">
             <el-radio
               v-for="dict in dict.type.sys_user_sex"
               :key="dict.value"
@@ -125,23 +134,47 @@
             >{{dict.label}}</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item label="电话号" prop="phone">
+          <el-input v-model="form.phone" placeholder="请输入电话号" />
+        </el-form-item>
         <el-form-item label="城市" prop="city">
           <el-input v-model="form.city" placeholder="请输入城市" />
         </el-form-item>
-        <el-form-item label="地区" prop="area">
-          <el-input v-model="form.area" placeholder="请输入地区" />
-        </el-form-item>
         <el-form-item label="身高" prop="height">
           <el-input v-model="form.height" placeholder="请输入身高" />
         </el-form-item>
         <el-form-item label="体重" prop="weight">
           <el-input v-model="form.weight" placeholder="请输入体重" />
         </el-form-item>
+        <el-form-item label="主要项目" prop="type">
+          <el-select v-model="form.type" placeholder="请选择主要项目">
+            <el-option
+              v-for="dict in dict.type.sys_user_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="球龄" prop="ballYears">
-          <el-input v-model="form.ballYears" placeholder="请输入球龄" />
+          <el-select v-model="form.ballYears" placeholder="请选择球龄">
+            <el-option
+              v-for="dict in dict.type.sys_user_year"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="队内位置" prop="place">
-          <el-input v-model="form.place" placeholder="请输入队内位置" />
+          <el-select v-model="form.place" placeholder="请选择队内位置">
+            <el-option
+              v-for="dict in dict.type.sys_user_place"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
         </el-form-item>
       </el-form>
     </el-dialog>
@@ -153,7 +186,7 @@ import { listUser, getUser } from "@/api/system/matchUser";
 
 export default {
   name: "User",
-  dicts: ['sys_user_sex'],
+  dicts: ['sys_user_sex','sys_user_type','sys_user_place','sys_user_year'],
   data() {
     return {
       // 遮罩层
@@ -178,18 +211,10 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        openid: null,
-        icon: null,
         name: null,
         nickname: null,
         sex: null,
         city: null,
-        area: null,
-        height: null,
-        weight: null,
-        type: null,
-        ballYears: null,
-        place: null
       },
       // 表单参数
       form: {},
@@ -219,14 +244,13 @@ export default {
     // 表单重置
     reset() {
       this.form = {
-        Id: null,
+        id: null,
         openid: null,
         icon: null,
         name: null,
         nickname: null,
         sex: null,
         city: null,
-        area: null,
         height: null,
         weight: null,
         type: null,
@@ -247,14 +271,14 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.Id)
+      this.ids = selection.map(item => item.id)
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
     /** 修改按钮操作 */
     handleView(row) {
       this.reset();
-      const Id = row.Id || this.ids
+      const Id = row.id || this.ids
       getUser(Id).then(response => {
         this.form = response.data;
         this.open = true;

+ 3 - 1
ruoyi-ui/src/views/system/matchconfig/index.vue

@@ -83,7 +83,9 @@ export default {
     },
     /** 图片上传操作 */
     onUpload(file) {
-      this.$set(this.form, `logoUrl`, process.env.VUE_APP_BASE_URL+file);
+      if(file){
+        this.$set(this.form, `logoUrl`, process.env.VUE_APP_BASE_URL+file)
+      }
     }
   }
 };

+ 43 - 45
ruoyi-ui/src/views/system/team/index.vue

@@ -17,14 +17,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="地区" prop="area">
-        <el-input
-          v-model="queryParams.area"
-          placeholder="请输入地区"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="是否使用" prop="isUse">
         <el-select v-model="queryParams.isUse" placeholder="请选择" clearable>
           <el-option
@@ -58,11 +50,14 @@
     <el-table v-loading="loading" :data="teamList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="名称" align="center" prop="name" />
-      <el-table-column label="类型" align="center" prop="type" />
+      <el-table-column label="类型" align="center" prop="type" >
+        <template slot-scope="scope">
+         <dict-tag :options="dict.type.sys_user_type" :value="scope.row.type"/>
+        </template>
+      </el-table-column>
       <el-table-column label="训练类型" align="center" prop="trainType" />
       <el-table-column label="城市" align="center" prop="city" />
-      <el-table-column label="地区" align="center" prop="area" />
-      <el-table-column label="队服颜色" align="center" prop="red" />
+      <el-table-column label="队服颜色" align="center" prop="color" />
       <el-table-column label="是否使用" align="center" prop="isUse" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUse"/>
@@ -75,7 +70,6 @@
             type="text"
             icon="el-icon-view"
             @click="handleView(scope.row)"
-            v-hasPermi="['system:matchUser:query']"
           >查看</el-button>
         </template>
       </el-table-column>
@@ -90,25 +84,32 @@
     />
 
     <!-- 添加或修改球队对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px" disable="true">
-        <el-form-item label="用户id" prop="userId">
-          <el-input v-model="form.userId" placeholder="请输入用户id" />
-        </el-form-item>
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px" :disabled="true">
         <el-form-item label="队徽" prop="logo">
           <el-avatar shape="square" size="large" :src="form.logo"></el-avatar>
         </el-form-item>
+        <el-form-item label="创建人" prop="userId">
+          <el-input v-model="user_name" placeholder="请输入球队创建人" />
+        </el-form-item>
         <el-form-item label="名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入名称" />
         </el-form-item>
+        <el-form-item label="类型" prop="type">
+          <el-select v-model="form.type" placeholder="请选择类型">
+            <el-option
+              v-for="dict in dict.type.sys_user_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="城市" prop="city">
           <el-input v-model="form.city" placeholder="请输入城市" />
         </el-form-item>
-        <el-form-item label="地区" prop="area">
-          <el-input v-model="form.area" placeholder="请输入地区" />
-        </el-form-item>
-        <el-form-item label="颜色" prop="red">
-          <el-input v-model="form.red" placeholder="请输入颜色" />
+        <el-form-item label="颜色" prop="color">
+          <el-input v-model="form.color" placeholder="请输入颜色" />
         </el-form-item>
         <el-form-item label="简介" prop="brief">
           <el-input v-model="form.brief" type="textarea" placeholder="请输入内容" />
@@ -128,11 +129,11 @@
 </template>
 
 <script>
-import { listTeam, getTeam, delTeam, addTeam, updateTeam } from "@/api/system/team";
-
+import { listTeam, getTeam } from "@/api/system/team";
+import { getUser } from "@/api/system/matchUser";
 export default {
   name: "Team",
-  dicts: ['sys_yes_no'],
+  dicts: ['sys_yes_no','sys_user_type'],
   data() {
     return {
       // 遮罩层
@@ -157,23 +158,16 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        userId: null,
-        logo: null,
         name: null,
-        type: null,
-        trainType: null,
         city: null,
-        area: null,
-        red: null,
-        member: null,
-        brief: null,
         isUse: null,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-      }
+      },
+      user_name:''
     };
   },
   created() {
@@ -197,22 +191,17 @@ export default {
     // 表单重置
     reset() {
       this.form = {
-        Id: null,
+        id: null,
         userId: null,
         logo: null,
         name: null,
         type: null,
         trainType: null,
         city: null,
-        area: null,
         red: null,
         member: null,
         brief: null,
         isUse: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null
       };
       this.resetForm("form");
     },
@@ -228,18 +217,19 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.Id)
+      this.ids = selection.map(item => item.id)
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
-    /** 修改按钮操作 */
+    /** 查看按钮操作 */
     handleView(row) {
       this.reset();
-      const Id = row.Id || this.ids
-      getTeam(Id).then(response => {
+      const Id = row.id || this.ids
+      getTeam(Id).then(async response => {
         this.form = response.data;
+        await this.UserInfo(response.data)
         this.open = true;
-        this.title = "用户信息";
+        this.title = "球队信息";
       });
     },
     /** 导出按钮操作 */
@@ -251,6 +241,14 @@ export default {
       }else {
         this.$modal.alertWarning("暂无数据无法导出!");
       }
+    },
+    /** 查询用户信息 */
+    UserInfo(response) {
+      if(response.userId!=null){
+        getUser(response.userId).then(response => {
+          this.user_name = response.data.name||response.data.nickname;
+        });
+      }
     }
   }
 };