flyzto 6 місяців тому
батько
коміт
6cac372e83

+ 11 - 2
web/apps/web-antd/src/views/match/components/match_card.vue

@@ -38,9 +38,13 @@ defineProps({
     type: Array,
     required: true
   },
+  matchNumStr: {
+    type: String,
+    required: false
+  },
   selected: {
     type: Array,
-    required: true
+    required: false
   }
 })
 </script>
@@ -48,7 +52,7 @@ defineProps({
 <template>
   <div class="match-card">
     <div class="card-header">
-      <div class="league-name">{{ leagueName }}</div>
+      <div class="league-name"><strong v-if="matchNumStr">[{{ matchNumStr }}]</strong>{{ leagueName }}</div>
       <div class="date-time">{{ dateTime }}</div>
     </div>
     <div class="team-name">
@@ -82,6 +86,11 @@ defineProps({
   justify-content: space-between;
   .league-name {
     font-size: 16px;
+    strong {
+      margin-right: 4px;
+      font-weight: normal;
+      color: hsl(var(--destructive));
+    }
   }
   .date-time {
     font-size: 12px;

+ 26 - 10
web/apps/web-antd/src/views/match/components/match_item.vue

@@ -6,28 +6,40 @@ export default {
   },
   props: {
     eventId: {
-      type: Number
+      type: Number,
+      required: true
     },
     leagueName: {
-      type: String
+      type: String,
+      required: true
     },
     teamHomeName: {
-      type: String
+      type: String,
+      required: true
     },
     teamAwayName: {
-      type: String
+      type: String,
+      required: true
     },
     dateTime: {
-      type: String
+      type: String,
+      required: true
+    },
+    matchNumStr: {
+      type: String,
+      required: false
     },
     selected: {
-      type: Boolean
+      type: Boolean,
+      required: false
     },
     disabled: {
-      type: Boolean
+      type: Boolean,
+      required: false
     },
     autoScroll: {
-      type: Boolean
+      type: Boolean,
+      required: false
     },
   },
   watch: {
@@ -46,7 +58,7 @@ export default {
 
 <template>
   <div class="match-item" :class="{ selected, disabled }" ref="gameItem">
-    <div class="match-league">{{ leagueName }}</div>
+    <div class="match-league"><strong v-if="matchNumStr">[{{ matchNumStr }}]</strong>{{ leagueName }}</div>
     <div class="match-team team-home">{{ teamHomeName }}</div>
     <div class="match-team team-away">{{ teamAwayName }}</div>
     <div class="match-time">{{ dateTime }}</div>
@@ -67,8 +79,12 @@ export default {
 
 .match-league {
   font-size: 16px;
-  font-weight: 500;
   margin-bottom: 4px;
+  strong {
+    margin-right: 4px;
+    font-weight: normal;
+    color: hsl(var(--destructive));
+  }
 }
 
 .match-team {

+ 5 - 3
web/apps/web-antd/src/views/match/related/index.vue

@@ -185,12 +185,12 @@ const updateGamesRelations = async () => {
 }
 
 const selectGame = (platform, game) => {
-  const { leagueId, eventId, timestamp, leagueName, teamHomeName, teamAwayName, selected } = game;
+  const { leagueId, eventId, timestamp, leagueName, teamHomeName, teamAwayName, selected, matchNumStr } = game;
   if (selected) {
     currentRelation[platform] = null;
   }
   else {
-    currentRelation[platform] = { leagueId, eventId, timestamp, leagueName, teamHomeName, teamAwayName };
+    currentRelation[platform] = { leagueId, eventId, timestamp, leagueName, teamHomeName, teamAwayName, matchNumStr };
   }
   if (platform == 'jc') {
     currentRelation.ps = null;
@@ -236,7 +236,8 @@ onMounted(() => {
           :leagueName="rel.jc.leagueName"
           :teamHomeName="rel.jc.teamHomeName"
           :teamAwayName="rel.jc.teamAwayName"
-          :dateTime="rel.jc.dateTime" />
+          :dateTime="rel.jc.dateTime"
+          :matchNumStr="rel.jc.matchNumStr" />
 
         <MatchItem  v-if="rel.ps"
           :eventId="rel.ps.eventId"
@@ -269,6 +270,7 @@ onMounted(() => {
           :teamHomeName="game.teamHomeName"
           :teamAwayName="game.teamAwayName"
           :dateTime="game.dateTime"
+          :matchNumStr="game.matchNumStr"
           :selected="game.selected"
           @click="selectGame('jc', game)" />
       </div>

+ 1 - 1
web/apps/web-antd/src/views/match/solutions/index.vue

@@ -330,7 +330,7 @@ onUnmounted(() => {
         :class="{ 'selected': selected, 'disabled': disabled }">
         <MatchCard platform="jc" :eventId="jc.eventId" :leagueName="jc.leagueName" :teamHomeName="jc.teamHomeName"
           :teamAwayName="jc.teamAwayName" :dateTime="jc.dateTime" :eventInfo="jc.eventInfo" :events="jc.events ?? []"
-          :selected="jc.selected ?? []" />
+          :matchNumStr="jc.matchNumStr" :selected="jc.selected ?? []" />
 
         <MatchCard platform="ps" :eventId="ps.eventId" :leagueName="ps.leagueName" :teamHomeName="ps.teamHomeName"
           :teamAwayName="ps.teamAwayName" :dateTime="ps.dateTime" :events="ps.events ?? []"