xiongzhu 7 anos atrás
pai
commit
cef83b2f48
28 arquivos alterados com 182 adições e 104 exclusões
  1. BIN
      docs/跟踪表181113.xlsx
  2. 8 0
      log.txt
  3. 3 0
      src/main/java/com/izouma/awesomeadmin/dao/MatchDataMapper.java
  4. 35 18
      src/main/java/com/izouma/awesomeadmin/dao/MatchDataMapper.xml
  5. 37 19
      src/main/java/com/izouma/awesomeadmin/model/MatchData.java
  6. 51 44
      src/main/java/com/izouma/awesomeadmin/service/impl/MatchDataServiceImpl.java
  7. 9 9
      src/main/java/com/izouma/awesomeadmin/web/MatchDataController.java
  8. 1 0
      src/main/vue/src/clientPages/Index.vue
  9. 1 2
      src/main/vue/src/clientPages/MatchInfo.vue
  10. 4 4
      src/main/vue/src/components/DoubleElimination.vue
  11. 16 3
      src/main/vue/src/components/RoundGroup.vue
  12. 14 2
      src/main/vue/src/components/VsPair.vue
  13. 1 1
      src/main/webapp/WEB-INF/html/admin.html
  14. 1 1
      src/main/webapp/WEB-INF/html/index.html
  15. 0 0
      src/main/webapp/static/css/index.9a12ed4733c8c86e88b04393f3e5b80f.css
  16. 0 0
      src/main/webapp/static/css/index.c6d58cc4e75fec1a473887f53b372428.css
  17. 0 0
      src/main/webapp/static/js/2.53658b9fbd940acf0a8d.js
  18. 0 0
      src/main/webapp/static/js/2.c431e03ba7b867c8add8.js
  19. 0 0
      src/main/webapp/static/js/28.0b6e424f4562d85dd37e.js
  20. 0 0
      src/main/webapp/static/js/29.4051b35f36940df0d6e1.js
  21. 0 0
      src/main/webapp/static/js/5.449f2190ff759a318257.js
  22. 0 0
      src/main/webapp/static/js/5.90254c0b232e8122d9af.js
  23. 0 0
      src/main/webapp/static/js/6.24c85b0dc432e68cafcb.js
  24. 0 0
      src/main/webapp/static/js/6.954a58eea521287a343c.js
  25. 0 0
      src/main/webapp/static/js/index.4538b6ff66af7fb89cd8.js
  26. 0 0
      src/main/webapp/static/js/manifest.145e38be4dd83e484dfc.js
  27. 0 0
      src/main/webapp/static/js/manifest.a29a44f58d00f06820f4.js
  28. 1 1
      src/test/java/MatchTest.java

BIN
docs/跟踪表181113.xlsx


+ 8 - 0
log.txt

@@ -924,3 +924,11 @@ java.lang.NullPointerException
 [2018-11-05 18:08:24] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
 [2018-11-05 18:29:23] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
 [2018-11-05 18:30:37] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-11-06 09:20:14] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-11-06 09:38:12] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-11-13 09:38:55] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-11-13 09:39:08] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-11-13 11:05:18] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-11-13 11:15:40] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-11-13 11:17:36] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-11-13 11:20:10] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.

+ 3 - 0
src/main/java/com/izouma/awesomeadmin/dao/MatchDataMapper.java

@@ -37,5 +37,8 @@ public interface MatchDataMapper {
     List<MatchData> getNextLoseMatchDataList(@Param("matchId") Integer matchId, @Param("loopNum") Integer loopNum, @Param("num") Integer num);
 
     List<MatchData> userMatchData(@Param("matchId") Integer matchId, @Param("userId") Integer userId);
+
+    List<MatchData> allUserMatchData(@Param("userId") Integer userId);
+
 }
 

+ 35 - 18
src/main/java/com/izouma/awesomeadmin/dao/MatchDataMapper.xml

@@ -26,7 +26,9 @@
         SELECT apply_info.*, sys_user.icon
         FROM apply_info
                  LEFT JOIN sys_user ON apply_info.user_id = sys_user.id
-        WHERE apply_info.del_flag = 'N' AND apply_info.match_id = #{matchId} AND apply_info.user_id = #{userId}
+        WHERE apply_info.del_flag = 'N'
+          AND apply_info.match_id = #{matchId}
+          AND apply_info.user_id = #{userId}
     </select>
     <sql id="Base_Column_List">
         id, del_flag, match_id, stage_id, user1, user2, score1, score2, bye1, bye2, abandon1, abandon2, state, winner, group_name, round, loop_num, pictures, upload_user    </sql>
@@ -564,26 +566,41 @@
     <select id="userMatchData" resultMap="BaseResultMap">
         SELECT *
         FROM match_data
-        WHERE match_id = #{matchId} AND state &lt; 2 AND (user1 IS NOT NULL AND user2 IS NOT NULL) AND (
-                (CASE (SELECT user_id FROM match_info WHERE id = #{matchId})
-                     WHEN #{userId} THEN TRUE
-                     ELSE FALSE END) OR (user1 = #{userId} OR user2 = #{userId})) AND del_flag = 'N' AND loop_num =
-                                                                                                         (SELECT min(loop_num)
-                                                                                                          FROM match_data
-                                                                                                          WHERE match_id = #{matchId}
-                                                                                                            AND state &lt; 2
-                                                                                                            AND (user1 IS NOT NULL AND user2 IS NOT NULL)
-                                                                                                            AND ((CASE (
-                                                                                                                       SELECT user_id
-                                                                                                                       FROM match_info
-                                                                                                                       WHERE id = #{matchId})
-                                                                                                                      WHEN #{userId}
-                                                                                                                            THEN TRUE
-                                                                                                                      ELSE FALSE END) OR
-                                                                                                                 (user1 = #{userId} OR user2 = #{userId})))
+        WHERE match_id = #{matchId}
+          AND state &lt; 2
+          AND (user1 IS NOT NULL AND user2 IS NOT NULL)
+          AND (
+                      (CASE (SELECT user_id FROM match_info WHERE id = #{matchId})
+                           WHEN #{userId} THEN TRUE
+                           ELSE FALSE END) OR (user1 = #{userId} OR user2 = #{userId}))
+          AND del_flag = 'N'
+          AND (loop_num =
+              (SELECT min(loop_num)
+               FROM match_data
+               WHERE match_id = #{matchId}
+                 AND state &lt; 2
+                 AND (user1 IS NOT NULL AND user2 IS NOT NULL)
+                 AND ((CASE (SELECT user_id FROM match_info WHERE id = #{matchId})
+                           WHEN #{userId}
+                                 THEN TRUE
+                           ELSE FALSE END) OR
+                      (user1 = #{userId} OR user2 = #{userId}))) OR state = 1)
 
         ORDER BY state DESC, loop_num
         LIMIT 20
     </select>
+    <select id="allUserMatchData" resultMap="BaseResultMap">
+        SELECT match_data.*, match_info.type, match_info.user_id
+        FROM match_data
+                 JOIN match_info ON match_data.match_id = match_info.id
+        WHERE match_data.state &lt; 2
+          AND (match_data.user1 IS NOT NULL AND match_data.user2 IS NOT NULL)
+          AND (
+                      (match_info.user_id = #{userId}) OR (match_data.user1 = #{userId} OR match_data.user2 = #{userId}))
+          AND match_data.del_flag = 'N'
+          AND match_info.del_flag = 'N'
+        ORDER BY match_data.match_id DESC, match_data.state DESC, match_data.loop_num
+        LIMIT 20
+    </select>
 </mapper>
 

+ 37 - 19
src/main/java/com/izouma/awesomeadmin/model/MatchData.java

@@ -9,27 +9,29 @@ import com.fasterxml.jackson.annotation.JsonInclude;
 @JsonAutoDetect
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class MatchData {
-    private Integer   id;
-    private String    delFlag;
-    private Integer   matchId;
-    private Integer   stageId;
-    private Integer   user1;
-    private Integer   user2;
-    private Integer   score1;
-    private Integer   score2;
-    private Boolean   bye1;
-    private Boolean   bye2;
-    private Boolean   abandon1;
-    private Boolean   abandon2;
-    private Integer   state;
-    private Integer   winner;
-    private String    groupName;
-    private Integer   round;
-    private Integer   loopNum;
-    private String    pictures;
-    private Integer   uploadUser;
+    private Integer id;
+    private String delFlag;
+    private Integer matchId;
+    private Integer stageId;
+    private Integer user1;
+    private Integer user2;
+    private Integer score1;
+    private Integer score2;
+    private Boolean bye1;
+    private Boolean bye2;
+    private Boolean abandon1;
+    private Boolean abandon2;
+    private Integer state;
+    private Integer winner;
+    private String groupName;
+    private Integer round;
+    private Integer loopNum;
+    private String pictures;
+    private Integer uploadUser;
     private ApplyInfo applyInfo1;
     private ApplyInfo applyInfo2;
+    private Integer type;
+    private Integer userId;
 
     private String searchKey;
 
@@ -234,5 +236,21 @@ public class MatchData {
     public void setAbandon2(Boolean abandon2) {
         this.abandon2 = abandon2;
     }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
 }
 

+ 51 - 44
src/main/java/com/izouma/awesomeadmin/service/impl/MatchDataServiceImpl.java

@@ -29,7 +29,7 @@ public class MatchDataServiceImpl implements MatchDataService {
     private static Logger logger = Logger.getLogger(MatchDataServiceImpl.class);
 
     @Autowired
-    private MatchDataMapper  matchDataMapper;
+    private MatchDataMapper matchDataMapper;
     @Autowired
     private MatchInfoService matchInfoService;
     @Autowired
@@ -173,11 +173,11 @@ public class MatchDataServiceImpl implements MatchDataService {
             winnerId = matchData.getUser2();
         }
 
-        int currentNum        = matchData.getRound();
-        int currentRound      = matchData.getLoopNum();
-        int totalRound        = (int) (Math.log(matchInfo.getTotalNum()) / Math.log(2));
+        int currentNum = matchData.getRound();
+        int currentRound = matchData.getLoopNum();
+        int totalRound = (int) (Math.log(matchInfo.getTotalNum()) / Math.log(2));
         int currentNumInRound = currentNum - GeometricProgressionSum(currentRound, totalRound - 1);
-        int nextRound         = currentRound + 1;
+        int nextRound = currentRound + 1;
         if (nextRound > totalRound) return;
         int nextNum = (int) Math.ceil(currentNumInRound / 2.0) + GeometricProgressionSum(nextRound, totalRound - 1);
 
@@ -233,15 +233,15 @@ public class MatchDataServiceImpl implements MatchDataService {
 //            abandon = matchData.getAbandon1();
 //        }
 
-        int     currentNum   = matchData.getRound();
-        boolean loseRound    = currentNum > matchInfo.getTotalNum() - 1;
-        int     winnerRound  = (int) (Math.log(matchInfo.getTotalNum()) / Math.log(2));
-        int     totalRound   = (winnerRound - 1) * 2;
-        int     currentRound = matchData.getLoopNum();
+        int currentNum = matchData.getRound();
+        boolean loseRound = currentNum > matchInfo.getTotalNum() - 1;
+        int winnerRound = (int) (Math.log(matchInfo.getTotalNum()) / Math.log(2));
+        int totalRound = (winnerRound - 1) * 2;
+        int currentRound = matchData.getLoopNum();
 
         Integer winnerId, loserId;
         boolean winnerBye = false;
-        boolean loseBye   = false;
+        boolean loseBye = false;
         if (matchData.getBye1() && !matchData.getBye2()) {
             winnerId = matchData.getUser2();
             loserId = null;
@@ -351,7 +351,7 @@ public class MatchDataServiceImpl implements MatchDataService {
                 currentNumInRound -= getLostRoundNum(i, totalRound);
             }
             int nextRound = currentRound + 1;
-            int nextNum   = matchInfo.getTotalNum() - 1;
+            int nextNum = matchInfo.getTotalNum() - 1;
             for (int i = 1; i <= currentRound; i++) {
                 nextNum += getLostRoundNum(i, totalRound);
             }
@@ -407,10 +407,10 @@ public class MatchDataServiceImpl implements MatchDataService {
 
         } else {
             int currentNumInRound = currentNum - GeometricProgressionSum(currentRound, winnerRound - 1);
-            int nextRoundWin      = currentRound + 1;
-            int nextNumWin        = (int) Math.ceil(currentNumInRound / 2.0) + GeometricProgressionSum(nextRoundWin, winnerRound - 1);
-            int nextRoundLose     = currentRound == 1 ? 1 : ((currentRound - 1) * 2);
-            int nextNumLose       = matchInfo.getTotalNum() - 1;
+            int nextRoundWin = currentRound + 1;
+            int nextNumWin = (int) Math.ceil(currentNumInRound / 2.0) + GeometricProgressionSum(nextRoundWin, winnerRound - 1);
+            int nextRoundLose = currentRound == 1 ? 1 : ((currentRound - 1) * 2);
+            int nextNumLose = matchInfo.getTotalNum() - 1;
             for (int i = 1; i < nextRoundLose; i++) {
                 nextNumLose += getLostRoundNum(i, totalRound);
             }
@@ -512,7 +512,7 @@ public class MatchDataServiceImpl implements MatchDataService {
         MatchData matchData = new MatchData();
         matchData.setMatchId(matchId);
         List<MatchData> matchDataList = getMatchDataList(matchData);
-        MatchInfo       matchInfo     = matchInfoService.getMatchInfoById(matchId.toString());
+        MatchInfo matchInfo = matchInfoService.getMatchInfoById(matchId.toString());
         for (MatchData md : matchDataList) {
             if (md.getBye1() || md.getBye2()) {
                 switch (matchInfo.getType()) {
@@ -533,17 +533,24 @@ public class MatchDataServiceImpl implements MatchDataService {
     @Override
     public List<MatchData> userMatchData(Integer matchId, Integer userId) {
         try {
-            MatchInfo matchInfo = matchInfoService.getMatchInfoById(matchId.toString());
-            if (matchInfo.getJudgeMode() == 2) {
+            List<MatchData> list;
+            if (matchId != null) {
+                MatchInfo matchInfo = matchInfoService.getMatchInfoById(matchId.toString());
+                if (matchInfo.getJudgeMode() == 2) {
+                    if (!userId.equals(matchInfo.getUserId())) {
+                        return null;
+                    }
+                }
+                list = matchDataMapper.userMatchData(matchId, userId);
                 if (!userId.equals(matchInfo.getUserId())) {
-                    return null;
+                    list.removeIf(matchData -> userId.equals(matchData.getUploadUser()));
                 }
+                return list;
+            } else {
+                list = matchDataMapper.allUserMatchData(userId);
+                list.removeIf(matchData -> userId.equals(matchData.getUploadUser()) && !userId.equals(matchData.getUserId()));
+                return list;
             }
-            List<MatchData> list = matchDataMapper.userMatchData(matchId, userId);
-            if (!userId.equals(matchInfo.getUserId())) {
-                list.removeIf(matchData -> userId.equals(matchData.getUploadUser()));
-            }
-            return list;
         } catch (Exception e) {
             logger.error("userMatchData", e);
         }
@@ -576,14 +583,14 @@ public class MatchDataServiceImpl implements MatchDataService {
         ApplyInfo applyInfo = new ApplyInfo();
         applyInfo.setMatchId(matchInfo.getId());
         List<ApplyInfo> applyList = applyInfoService.getApplyInfoList(applyInfo);
-        int             num       = matchInfo.getStageInfo().get(0).getTotalNum() / 2;
+        int num = matchInfo.getStageInfo().get(0).getTotalNum() / 2;
         List<MatchData> list = Stream.generate(MatchData::new)
                 .limit(num)
                 .collect(Collectors.toList());
-        Iterator<ApplyInfo> it    = applyList.iterator();
-        int                 index = 0;
+        Iterator<ApplyInfo> it = applyList.iterator();
+        int index = 0;
         while (it.hasNext()) {
-            ApplyInfo a         = it.next();
+            ApplyInfo a = it.next();
             MatchData matchData = list.get(index % num);
             if (index < num) {
                 matchData.setMatchId(matchInfo.getId());
@@ -631,14 +638,14 @@ public class MatchDataServiceImpl implements MatchDataService {
         ApplyInfo applyInfo = new ApplyInfo();
         applyInfo.setMatchId(matchInfo.getId());
         List<ApplyInfo> applyList = applyInfoService.getApplyInfoList(applyInfo);
-        int             num       = matchInfo.getStageInfo().get(0).getTotalNum() / 2;
+        int num = matchInfo.getStageInfo().get(0).getTotalNum() / 2;
         List<MatchData> list = Stream.generate(MatchData::new)
                 .limit(num)
                 .collect(Collectors.toList());
-        Iterator<ApplyInfo> it    = applyList.iterator();
-        int                 index = 0;
+        Iterator<ApplyInfo> it = applyList.iterator();
+        int index = 0;
         while (it.hasNext()) {
-            ApplyInfo a         = it.next();
+            ApplyInfo a = it.next();
             MatchData matchData = list.get(index % num);
             if (index < num) {
                 matchData.setMatchId(matchInfo.getId());
@@ -663,9 +670,9 @@ public class MatchDataServiceImpl implements MatchDataService {
     private void initRoundRobinMatchData(MatchInfo matchInfo) {
         ApplyInfo applyInfo = new ApplyInfo();
         applyInfo.setMatchId(matchInfo.getId());
-        List<ApplyInfo> applyList  = applyInfoService.getApplyInfoList(applyInfo);
-        int             groupNum   = 0;
-        int             totalGroup = Integer.toString(matchInfo.getStageInfo().get(0).getTotalNum() / matchInfo.getStageInfo().get(0).getGroupNum(), 26).length();
+        List<ApplyInfo> applyList = applyInfoService.getApplyInfoList(applyInfo);
+        int groupNum = 0;
+        int totalGroup = Integer.toString(matchInfo.getStageInfo().get(0).getTotalNum() / matchInfo.getStageInfo().get(0).getGroupNum(), 26).length();
         while (applyList.size() > 0) {
             List<ApplyInfo> group = RandomDataUtil.generateRandomDataNoRepeat(applyList, matchInfo.getStageInfo().get(0).getGroupNum());
             for (int i = 0; i < group.size(); i++) {
@@ -700,13 +707,13 @@ public class MatchDataServiceImpl implements MatchDataService {
     }
 
     private MatchData initByeDataSingle(MatchInfo matchInfo, MatchData matchData) {
-        int       currentNum        = matchData.getRound();
-        int       currentRound      = matchData.getLoopNum();
-        int       totalRound        = (int) (Math.log(matchInfo.getTotalNum()) / Math.log(2));
-        int       currentNumInRound = currentNum - GeometricProgressionSum(currentRound, totalRound - 1);
-        int       nextRound         = currentRound + 1;
-        int       nextNum           = (int) Math.ceil(currentNumInRound / 2.0) + GeometricProgressionSum(nextRound, totalRound - 1);
-        MatchData nextMatchData     = new MatchData();
+        int currentNum = matchData.getRound();
+        int currentRound = matchData.getLoopNum();
+        int totalRound = (int) (Math.log(matchInfo.getTotalNum()) / Math.log(2));
+        int currentNumInRound = currentNum - GeometricProgressionSum(currentRound, totalRound - 1);
+        int nextRound = currentRound + 1;
+        int nextNum = (int) Math.ceil(currentNumInRound / 2.0) + GeometricProgressionSum(nextRound, totalRound - 1);
+        MatchData nextMatchData = new MatchData();
         nextMatchData.setMatchId(matchData.getMatchId());
         nextMatchData.setRound(nextNum);
         nextMatchData.setLoopNum(nextRound);
@@ -732,7 +739,7 @@ public class MatchDataServiceImpl implements MatchDataService {
     }
 
     private int GeometricProgressionSum(int level, int topLevel) {
-        int sum    = 0;
+        int sum = 0;
         int factor = (int) Math.pow(2, topLevel);
         while (level > 1) {
             sum += factor;

+ 9 - 9
src/main/java/com/izouma/awesomeadmin/web/MatchDataController.java

@@ -119,7 +119,7 @@ public class MatchDataController {
     @RequiresAuthentication
     @RequestMapping(value = "/userMatchData", method = RequestMethod.GET)
     @ResponseBody
-    public Result userMatchData(@RequestParam("matchId") Integer matchId, @RequestParam("userId") Integer userId) {
+    public Result userMatchData(@RequestParam(value = "matchId", required = false) Integer matchId, @RequestParam("userId") Integer userId) {
 
         List<MatchData> list = matchDataService.userMatchData(matchId, userId);
         if (list != null) {
@@ -144,13 +144,13 @@ public class MatchDataController {
         List<MatchData> matchDatas = matchDataService.getMatchDataList(record);
 
 
-        String sheetName = "match_data";
-        String titleName = "比赛数据数据表";
-        String fileName = "比赛数据表";
-        int columnNumber = 15;
-        int[] columnWidth = {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20};
-        String[] columnName = {"", "删除标识", "比赛id", "阶段id", "玩家1", "玩家2", "得分1", "得分2", "状态", "胜方", "组别", "轮次", "循环", "照片", "提交人"};
-        String[][] dataList = new String[matchDatas.size()][15];
+        String     sheetName    = "match_data";
+        String     titleName    = "比赛数据数据表";
+        String     fileName     = "比赛数据表";
+        int        columnNumber = 15;
+        int[]      columnWidth  = {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20};
+        String[]   columnName   = {"", "删除标识", "比赛id", "阶段id", "玩家1", "玩家2", "得分1", "得分2", "状态", "胜方", "组别", "轮次", "循环", "照片", "提交人"};
+        String[][] dataList     = new String[matchDatas.size()][15];
 
         for (int i = 0; i < matchDatas.size(); i++) {
 
@@ -173,7 +173,7 @@ public class MatchDataController {
 
 
         ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
-                columnNumber, columnWidth, columnName, dataList, response);
+                                           columnNumber, columnWidth, columnName, dataList, response);
 
 
     }

+ 1 - 0
src/main/vue/src/clientPages/Index.vue

@@ -203,6 +203,7 @@
                 .drop-down-menu {
                     width: 150px;
                     background: rgba(19, 26, 33, 0.85);
+                    z-index: 99;
                     .menu-item {
                         color: #ffffff;
                         height: 44px;

+ 1 - 2
src/main/vue/src/clientPages/MatchInfo.vue

@@ -1410,9 +1410,8 @@
 
     .btn-back {
         position: fixed;
-        top: 100px;
+        top: 90px;
         right: 0;
-        z-index: 999;
         background: #f15436;
         color: #ffffff;
         height: 44px;

+ 4 - 4
src/main/vue/src/components/DoubleElimination.vue

@@ -90,7 +90,7 @@
                     {{finalData.applyInfo1 ? finalData.applyInfo1.nickname : '暂无'}}
                 </text>
                 <text :x="finalX + width - 20" :y="finalY - height + height/2 + 4" text-anchor="end" class="team-score">
-                    {{finalData.score1 >= 0 ? finalData.score1 : '-'}}
+                    {{(finalData.state === 2 && finalData.score1 >= 0) ? finalData.score1 : '-'}}
                 </text>
                 <rect :x="finalX" :y="finalY" :width="width" :height="height" class="team-rect"
                       :style="{fill:finalData&&finalData.user2===highlightUser?'#F15436':''}"></rect>
@@ -98,7 +98,7 @@
                     {{finalData.applyInfo2 ? finalData.applyInfo2.nickname : '暂无'}}
                 </text>
                 <text :x="finalX + width - 20" :y="finalY + height/2 + 4" text-anchor="end" class="team-score">
-                    {{finalData.score2 >= 0 ? finalData.score2 : '-'}}
+                    {{(finalData.state === 2 && finalData.score2 >= 0) ? finalData.score2 : '-'}}
                 </text>
                 <text :x="finalX - 10" :y="finalY + 4" text-anchor="end" class="vs-num">
                     {{finalNum}}
@@ -122,7 +122,7 @@
                     {{extraData.applyInfo1 ? extraData.applyInfo1.nickname : '暂无'}}
                 </text>
                 <text :x="finalX + width + xGap + width - 20" :y="finalY - height + height/2 + 4" text-anchor="end"
-                      class="team-score">{{extraData.score1 >= 0 ? extraData.score1 : '-'}}
+                      class="team-score">{{(extraData.state === 2 && extraData.score1 >= 0) ? extraData.score1 : '-'}}
                 </text>
                 <rect :x="finalX + width + xGap" :y="finalY" :width="width" :height="height"
                       :style="{fill:extraData&&extraData.user2===highlightUser?'#F15436':''}" class="team-rect"></rect>
@@ -130,7 +130,7 @@
                     {{extraData.applyInfo2 ? extraData.applyInfo2.nickname : '暂无'}}
                 </text>
                 <text :x="finalX + width + xGap + width - 20" :y="finalY + height/2 + 4" text-anchor="end"
-                      class="team-score">{{extraData.score2 >= 0 ? extraData.score2 : '-'}}
+                      class="team-score">{{(extraData.state === 2 && extraData.score2 >= 0) ? extraData.score2 : '-'}}
                 </text>
                 <text :x="finalX + width + xGap - 10" :y="finalY + 4" text-anchor="end" class="vs-num">
                     {{finalNum + 1}}

+ 16 - 3
src/main/vue/src/components/RoundGroup.vue

@@ -80,7 +80,8 @@
         </template>
         <template v-for="j in loop" v-if="mode !== 'edit'">
             <template v-for="n in groupNum * (groupNum - 1) / 2">
-                <template v-if="matchData[j-1][n-1] && matchData[j-1][n-1].applyInfo1 && matchData[j-1][n-1].applyInfo2">
+                <template
+                    v-if="matchData[j-1][n-1] && matchData[j-1][n-1].applyInfo1 && matchData[j-1][n-1].applyInfo2">
                     <rect class="title-rect" :x="x"
                           :y="y + titleHeight + groupNum * rowHeight + (j - 1) * (titleHeight + rowHeight * groupNum * (groupNum - 1) / 2)"
                           :width="width" :height="titleHeight">
@@ -109,13 +110,13 @@
                           :x="x + width - (width - 50) / 2 - 15"
                           :y="y + 2 * titleHeight + groupNum * rowHeight + (n - 1) * rowHeight + (j - 1) * (titleHeight + rowHeight * groupNum * (groupNum - 1) / 2) + rowHeight / 2 + 5"
                           text-anchor="end">
-                        {{matchData[j-1][n-1].score1 >= 0 ? matchData[j-1][n-1].score1 : '-'}}
+                        {{score1(j-1,n-1)}}
                     </text>
                     <text class="round-text"
                           :x="x + width - (width - 50) / 2 + 15"
                           :y="y + 2 * titleHeight + groupNum * rowHeight + (n - 1) * rowHeight + (j - 1) * (titleHeight + rowHeight * groupNum * (groupNum - 1) / 2) + rowHeight / 2 + 5"
                           text-anchor="start">
-                        {{matchData[j-1][n-1].score2 >= 0 ? matchData[j-1][n-1].score2 : '-'}}
+                        {{score2(j-1,n-1)}}
                     </text>
                     <text class="round-text"
                           :x="x + width - (width - 50) / 2 - (width - 100) / 4"
@@ -213,6 +214,18 @@
                 let chinese = ['一', '二', '三', '四', '五', '六', '七', '八', '九'];
                 return `详细对阵循环${chinese[i - 1]}`;
             },
+            score1(i, j) {
+                if (this.matchData[i][j] && this.this.matchData[i][j].state === 2) {
+                    return this.matchData[i][j].score1 >= 0 ? this.matchData[i][j].score1 : '-'
+                }
+                return '-'
+            },
+            score2(i, j) {
+                if (this.matchData[i][j] && this.this.matchData[i][j].state === 2) {
+                    return this.matchData[i][j].score2 >= 0 ? this.matchData[i][j].score2 : '-'
+                }
+                return '-'
+            },
             showSwitchIcon(userId) {
                 let hide = this.switchData.filter(i => {
                     return i.groupName === this.name && i.userId !== userId;

+ 14 - 2
src/main/vue/src/components/VsPair.vue

@@ -6,7 +6,7 @@
             {{name(1)}}
         </text>
         <text :x="x + width - 20" :y="y0 + height/2 + 4" text-anchor="end" class="team-score">
-            {{matchData.score1 >= 0 ? matchData.score1 : '-'}}
+            {{score1}}
         </text>
         <rect :x="x" :y="y1" :width="width" :height="height"
               :style="{fill:matchData&&matchData.user2===highlightUser?'#F15436':''}" class="team-rect"></rect>
@@ -14,7 +14,7 @@
             {{name(2)}}
         </text>
         <text :x="x + width - 20" :y="y1 + height/2 + 4" text-anchor="end" class="team-score">
-            {{matchData.score2 >= 0 ? matchData.score2 : '-'}}
+            {{score2}}
         </text>
         <text :x="x - 10" :y="y1 + 4" text-anchor="end" class="vs-num">
             {{num}}
@@ -122,6 +122,18 @@
             y1() {
                 return this.y0 + this.height;
             },
+            score1() {
+                if (this.matchData.state === 2) {
+                    return this.matchData.score1 >= 0 ? this.matchData.score1 : '-'
+                }
+                return '-'
+            },
+            score2() {
+                if (this.matchData.state === 2) {
+                    return this.matchData.score2 >= 0 ? this.matchData.score2 : '-'
+                }
+                return '-'
+            },
             num() {
                 switch (this.type) {
                     case 'normal':

+ 1 - 1
src/main/webapp/WEB-INF/html/admin.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>管理后台</title><link rel=icon href=/static/favicon.ico><script src=/static/polyfill.min.js></script><script src=/static/fontawesome-v5.2.0.js></script><link href=/static/css/admin.ebfecf0821722ec1b9de7e4cf3e9703a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.a29a44f58d00f06820f4.js></script><script type=text/javascript src=/static/js/vendor.0ff0335df35a15f717ef.js></script><script type=text/javascript src=/static/js/admin.18e16050023b8e99f267.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>管理后台</title><link rel=icon href=/static/favicon.ico><script src=/static/polyfill.min.js></script><script src=/static/fontawesome-v5.2.0.js></script><link href=/static/css/admin.ebfecf0821722ec1b9de7e4cf3e9703a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.145e38be4dd83e484dfc.js></script><script type=text/javascript src=/static/js/vendor.0ff0335df35a15f717ef.js></script><script type=text/javascript src=/static/js/admin.18e16050023b8e99f267.js></script></body></html>

+ 1 - 1
src/main/webapp/WEB-INF/html/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>电竞×</title><link rel=icon href=/static/favicon.ico><script src=/static/polyfill.min.js></script><script src=/static/fontawesome-v5.2.0.js></script><link href=/static/css/index.9a12ed4733c8c86e88b04393f3e5b80f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.a29a44f58d00f06820f4.js></script><script type=text/javascript src=/static/js/vendor.0ff0335df35a15f717ef.js></script><script type=text/javascript src=/static/js/index.63df51734740952087ec.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>电竞×</title><link rel=icon href=/static/favicon.ico><script src=/static/polyfill.min.js></script><script src=/static/fontawesome-v5.2.0.js></script><link href=/static/css/index.c6d58cc4e75fec1a473887f53b372428.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.145e38be4dd83e484dfc.js></script><script type=text/javascript src=/static/js/vendor.0ff0335df35a15f717ef.js></script><script type=text/javascript src=/static/js/index.4538b6ff66af7fb89cd8.js></script></body></html>

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/css/index.9a12ed4733c8c86e88b04393f3e5b80f.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/css/index.c6d58cc4e75fec1a473887f53b372428.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/2.53658b9fbd940acf0a8d.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/2.c431e03ba7b867c8add8.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/28.0b6e424f4562d85dd37e.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/29.4051b35f36940df0d6e1.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/5.449f2190ff759a318257.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/5.90254c0b232e8122d9af.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/6.24c85b0dc432e68cafcb.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/6.954a58eea521287a343c.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/index.4538b6ff66af7fb89cd8.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/manifest.145e38be4dd83e484dfc.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/static/js/manifest.a29a44f58d00f06820f4.js


+ 1 - 1
src/test/java/MatchTest.java

@@ -33,7 +33,7 @@ public class MatchTest {
     @Test
     public void createMatch() {
 
-        int matchId = 79;
+        int matchId = 89;
         MatchInfo matchInfo = matchInfoService.getMatchInfoById(String.valueOf(matchId));
 
         List<UserInfo> userInfoList = RandomDataUtil.generateRandomDataNoRepeat(userInfoService.getUserInfoList(new UserInfo()), matchInfo.getStageInfo().get(0).getTotalNum());

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff