GameLineup.vue 35.8 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825
<!-- 阵容 -->
<template>
    <van-pull-refresh v-if="!no_data && lineup" success-text="刷新成功" v-model="loading" @refresh="onRefresh">
        <template #loosing> 
            <div class="refresh-txt">
                <svg-icon className="icon" iconName="loading" :class="{ 'is-spinning': loading }"></svg-icon>
                <span>释放即可刷新</span>
            </div> 
        </template>
        <template #loading>  
            <div class="refresh-txt">
                <svg-icon className="icon" iconName="loading" :class="{ 'is-spinning': loading }"></svg-icon>
                <span>加载中……</span>
            </div>
        </template> 
        <template #success>  
            <div class="refresh-txt">
                <svg-icon className="icon" iconName="loading" :class="{ 'is-spinning': loading }"></svg-icon>
                <span>刷新成功</span>
            </div>
        </template> 
        <section class="first" v-if="lineup.confirmed > -1 && lineup.away_formation && lineup.home_formation">
            <div class="title-lineup">首发阵容</div>
            <div class="team-formation">
                <div>
                    <div class="team-info">
                        <img v-lazy="{src:game_info?.host_photo,error:getTeamLazyErrorLogo(game_detail.nm_home_team_logo)}" width="30px"><span class="team-name">{{ game_info?.host_name }}</span>
                    </div>
                    <div class="team-rating" v-if="team_rating?.home_first_mean > 0">首发均评分<span class="fen">{{ team_rating.home_first_mean }}</span></div>
                </div>
                <div>阵型<span class="formation">{{lineup.home_formation}}</span></div>
            </div>
            <div class="first-lineup">
                <div class="home-lineup" >
                    <template v-for="(item,index) in lineup.home" :key="item.id">
                        <div v-if="item.first == 1" class="player" :style="`left: ${item.x}%; top: ${item.y}%; z-index: ${index};`">
                            <div>
                                <div class="player-img" v-lazy:background-image="item.logo || player_default_img" :style="`border-color:${lineup.home_color}`">
                                    <div v-if="item.rating > 0" class="img-top">
                                        <div class="rating" :style="`background-color:${index < 3 ? '#ff8710' : index > team_rating.home_count - 3 && index < team_rating.home_count ? '#649F04' : '#6EC96F'}`">{{item.rating}}</div>
                                    </div>
                                    <div class="img-left">
                                        <div class="shirt-number">{{item.shirt_number}}</div>
                                    </div>
                                </div>
                                <div class="player-live">
                                    <div class="name">
                                        <b class="captain" v-if="item.captain == 1">队长</b>
                                        <b class="captain" v-if="index == 0">最佳</b>
                                        {{item?.short_name || item.name}}
                                    </div>
                                    <div class="incident" v-if="item.incidents">
                                        <template v-for="(val,index) in item.incidents" :key="index">
                                            <svg-icon v-if="val.assist1 && val.assist1.id == item.id" className="icon" :iconName="type[18].icon"></svg-icon>
                                            <svg-icon v-else-if="val.type == 9" className="icon" iconName="huanxia"></svg-icon>
                                            <svg-icon v-else className="icon" :iconName="type[val.type].icon"></svg-icon>
                                        </template>
                                    </div>
                                </div>
                            </div>
                        </div> 
                    </template>
                </div>
                <div class="away-lineup">
                    <template  v-for="(item,index) in lineup.away" :key="item.id">
                        <div v-if="item.first == 1" class="player away" :style="`left: ${100-item.x}%; bottom: ${item.y}%; z-index: ${index};`">
                            <div>
                                <div class="player-img" v-lazy:background-image="item.logo || player_default_img" :style="`border-color:${lineup.away_color}`">
                                    <div v-if="item.rating > 0" class="img-top">
                                        <div class="rating" :style="`background-color:${index < 3 ? '#ff8710' : index > team_rating.away_count - 3 && index < team_rating.away_count ? '#649F04' : '#6EC96F'}`">{{item.rating}}</div>
                                    </div>
                                    <div class="img-left">
                                        <div class="shirt-number">{{item.shirt_number}}</div>
                                    </div>
                                </div>
                                <div class="player-live">
                                    <div class="name">
                                        <b class="captain" v-if="item.captain == 1">队长</b>
                                        <b class="captain" v-if="index == 0">最佳</b>
                                        {{item?.short_name || item.name}}
                                    </div>
                                    <div class="incident" v-if="item.incidents">
                                        <template v-for="(val,index) in item.incidents" :key="index">
                                            <svg-icon v-if="val.assist1 && val.assist1.id == item.id" className="icon" :iconName="type[18].icon"></svg-icon>
                                            <svg-icon v-else-if="val.type == 9" className="icon" iconName="huanxia"></svg-icon>
                                            <svg-icon v-else className="icon" :iconName="type[val.type].icon"></svg-icon>
                                        </template>
                                    </div>
                                </div>
                            </div>
                        </div> 
                    </template>
                </div>
            </div>
            <div class="team-formation">
                <div>
                    <div class="team-info">
                        <img v-lazy="{src:game_info?.away_photo,error:getTeamLazyErrorLogo(game_detail.nm_away_team_logo)}" width="30px">
                        <span class="team-name">{{ game_info?.away_name }}</span>
                    </div>
                    <div class="team-rating" v-if="team_rating?.away_first_mean > 0">首发均评分<span class="fen">{{ team_rating.away_first_mean }}</span></div>
                </div>
                <div>阵型<span class="formation">{{lineup.away_formation}}</span></div>
            </div>
        </section>
        <section class="first second" v-else>
            <div class="title-lineup">首发阵容</div>
            <div class="match_team">
                <div class="match_team_container">
                    <div class="team_logo" :style="`background-image: url(${game_info?.host_photo});`"></div> 
                    <div class="text-info">
                        <p class="team_name">{{ game_info?.host_name }}</p> 
                    </div>
                </div>
                 <div class="match_team_container">
                    <div class="team_logo mat-left" :style="`background-image: url(${game_info?.away_photo});`"></div> 
                    <div class="text-info">
                        <p class="team_name">{{ game_info?.away_name }}</p> 
                    </div>
                </div>
            </div>
            <div class="second-lineup" >
                <div class="home-lineup">
                    <template v-for="(item,index) in lineup.home" :key="item.id">
                        <div v-if="item.first == 1" class="player-box">
                            <div class="player-left">
                                <div class="player-img" :style="`background-color: ${lineup.home_color || '#204077'};`">
                                    {{ item.shirt_number }}
                                </div>
                            </div>
                            <div class="player-right">
                                <div class="n-p-r">
                                    <div class="name">
                                        {{item?.short_name || item.name}}
                                        <span class="rating" v-if="item.rating > 0" :style="`background-color:${index < 3 ? '#ff8710' : index > team_rating.home_count - 3 && index < team_rating.home_count ? '#649F04' : '#6EC96F'}`">{{item.rating}}</span>
                                    </div>
                                    <div class="position-icon">
                                        <span class="position">{{position[item.position]}}</span>
                                        <div class="time-svg" v-if="item.incidents">
                                            <template v-for="val in item.incidents" :key="val.time">
                                                <div v-if="val.type != 9">
                                                    <svg-icon className="icon" :iconName="type[val.type].icon"></svg-icon>
                                                </div>
                                            </template>
                                        </div>
                                    </div>
                                </div>
                                <div class="time-svg" v-if="item.incidents">
                                    <template v-for="val in item.incidents" :key="val.time">
                                        <div v-if="val.type == 9">
                                            <svg-icon className="icon" iconName="huanxia"></svg-icon>
                                            <span>{{ val.time }}</span>
                                        </div>
                                    </template>
                                </div>
                            </div>
                        </div>
                    </template>
                </div>
                <div class="away-lineup">
                    <template v-for="(item,index) in lineup.away" :key="item.id">
                        <div v-if="item.first == 1" class="player-box">
                            <div  class="player-left">
                                <div class="player-img" :style="`background-color: ${lineup.away_color || '#ae5971'};`">
                                    {{ item.shirt_number }}
                                </div>
                            </div>
                            <div class="player-right">
                                <div class="n-p-r">
                                    <div class="name">
                                        {{item?.short_name || item.name}}
                                        <span class="rating" v-if="item.rating > 0" :style="`background-color:${index < 3 ? '#ff8710' : index > team_rating.away_count - 3 && index < team_rating.away_count ? '#649F04' : '#6EC96F'}`">{{item.rating}}</span>
                                    </div>
                                    <div class="position-icon">
                                        <span class="position">{{position[item.position]}}</span>
                                        <div class="time-svg" v-if="item.incidents">
                                            <template v-for="val in item.incidents" :key="val.time">
                                                <div v-if="val.type != 9">
                                                    <svg-icon className="icon" :iconName="type[val.type].icon"></svg-icon>
                                                </div>
                                            </template>
                                        </div>
                                    </div>
                                </div>
                                <div class="time-svg" v-if="item.incidents">
                                    <template v-for="val in item.incidents" :key="val.time">
                                        <div v-if="val.type == 9">
                                            <svg-icon className="icon" iconName="huanxia"></svg-icon>
                                            <span>{{ val.time }}</span>
                                        </div>
                                    </template>
                                </div>
                            </div>
                        </div>
                    </template>
                </div>
            </div>
        </section>
        <section class="second" v-if="second_show">
            <div class="title-lineup">替补阵容</div>
            <div class="match_team">
                <div class="match_team_container">
                    <div class="team_logo" :style="`background-image: url(${game_info?.host_photo});`"></div> 
                    <div class="text-info">
                        <p class="team_name">{{ game_info?.host_name }}</p> 
                    </div>
                </div>
                 <div class="match_team_container">
                    <div class="team_logo mat-left" :style="`background-image: url(${game_info?.away_photo});`"></div> 
                    <div class="text-info">
                        <p class="team_name">{{ game_info?.away_name }}</p> 
                    </div>
                </div>
            </div>
            <div class="second-lineup" >
                <div class="home-lineup">
                    <template v-for="(item,index) in lineup.home" :key="item.id">
                        <div v-if="item.first == 0" class="player-box">
                            <div class="player-left">
                                <div class="player-img" :style="`background-color: ${lineup.home_color || '#204077'};`">
                                    {{ item.shirt_number}}
                                </div>
                            </div>
                            <div class="player-right">
                                <div class="n-p-r">
                                    <div class="name">
                                        {{item?.short_name || item.name}}
                                        <span class="rating" v-if="item.rating > 0" :style="`background-color:${index < 3 ? '#ff8710' : index > team_rating.home_count - 3 && index < team_rating.home_count ? '#649F04' : '#6EC96F'}`">{{item.rating}}</span>
                                    </div>
                                    <div class="position-icon">
                                        <span class="position">{{position[item.position]}}</span>
                                        <div class="time-svg" v-if="item.incidents">
                                            <template v-for="val in item.incidents" :key="val.time">
                                                <div v-if="val.type != 9">
                                                    <svg-icon className="icon" :iconName="type[val.type].icon"></svg-icon>
                                                </div>
                                            </template>
                                        </div>
                                    </div>
                                </div>
                                <div class="time-svg" v-if="item.incidents">
                                    <template v-for="val in item.incidents" :key="val.time">
                                        <div v-if="val.type == 9">
                                            <svg-icon className="icon" iconName="huanshang"></svg-icon>
                                            <span>{{ val.time }}</span>
                                        </div>
                                    </template>
                                </div>
                            </div>
                        </div>
                    </template>
                </div>
                <div class="away-lineup">
                    <template v-for="(item,index) in lineup.away" :key="item.id">
                        <div v-if="item.first == 0" class="player-box">
                            <div  class="player-left">
                                <div class="player-img" :style="`background-color: ${lineup.away_color || '#ae5971'};`">
                                    {{ item.shirt_number }}
                                </div>
                            </div>
                            <div class="player-right">
                                <div class="n-p-r">
                                    <div class="name">
                                        {{item?.short_name || item.name}}
                                        <span class="rating" v-if="item.rating > 0" :style="`background-color:${index < 3 ? '#ff8710' : index > team_rating.away_count - 3 && index < team_rating.away_count ? '#649F04' : '#6EC96F'}`">{{item.rating}}</span>
                                    </div>
                                    <div class="position-icon">
                                        <span class="position">{{position[item.position]}}</span>
                                        <div class="time-svg" v-if="item.incidents">
                                            <template v-for="val in item.incidents" :key="val.time">
                                                <div v-if="val.type != 9">
                                                    <svg-icon className="icon" :iconName="type[val.type].icon"></svg-icon>
                                                </div>
                                            </template>
                                        </div>
                                    </div>
                                </div>
                                <div class="time-svg" v-if="item.incidents">
                                    <template v-for="val in item.incidents" :key="val.time">
                                        <div v-if="val.type == 9">
                                            <svg-icon className="icon" iconName="huanshang"></svg-icon>
                                            <span>{{ val.time }}</span>
                                        </div>
                                    </template>
                                </div>
                            </div>
                        </div>
                    </template>
                </div>
            </div>
        </section>
        <section class="injury">
            <div class="title-lineup">伤停信息</div>
            <div class="injury-lineup">

            </div>
        </section>
        <div class="icon-box">
            <div class="icon-son" v-for="(item,index) in icon_list" :key="index">
                <div class="icon-svg">
                    <svg-icon className="icon" :iconName="item.icon"></svg-icon>
                    <span>{{item.text}}</span>
                </div>
            </div>
        </div>
    </van-pull-refresh>
    <noData v-if="no_data" nodata_message="暂无对阵数据!"></noData>
</template>
  
<script lang="ts">
import { ref,defineComponent,onMounted,onUnmounted,toRef,watch} from 'vue';
import * as nm_match_api from '@/api/nm_match_api';
import { useRoute } from 'vue-router';
import { default as _ } from 'lodash';
import noData from '@/components/NoData.vue';
import { nm_type } from '@/common/js/nm_config';
import { default as moment } from 'moment';
import {getTeamLazyErrorLogo } from '@/until/index';
//mitt插件 实现组件间的通信
import { events } from '@/until/eventBus.js';

export default defineComponent({
    name:'GameLineup',
    components: {noData},
    props: { 
        gameInfo: {
            type: Object,
            default: () => { return {}; }
        },
        gameDetail: {
            type: Object,
            default: () => { return {}; }
        },
        activeName: { type: String, default: '' },
    },
    setup(props:any){
        const route = useRoute();
        const game_info:any = toRef(props,'gameInfo');
        const game_detail:any = toRef(props,'gameDetail')
        const loading = ref(true);
        const no_data = ref(false);
        const player_default_img = ref('https://img2.ydniu.com/app/images/default_user.png');
        const lineup:any = ref(null);
        const status_id:any = ref(1);
        const icon_list = ref([
            {icon:"jinqiu",text:"进球",order:1},
            {icon:"dianqiu",text:"点球",order:2},
            {icon:"dianqiuweijin",text:"点球未进",order:3},
            {icon:"wulongqiu",text:"乌龙球",order:4},
            {icon:"zhugong",text:"助攻",order:5},
            {icon:"duizhang",text:"队长",order:6},
            {icon:"huangpai",text:"黄牌",order:7},
            {icon:"hongpai",text:"红牌",order:8},
            {icon:"lianghuangbianhong",text:"两黄一红",order:9},
            {icon:"huanren",text:"换人",order:10},
            {icon:"quanchangzuijia",text:"全场最佳",order:11},
            {icon:"var",text:"VAR",order:12},
        ]);
        const team_rating:any = ref({
            home_count:0,
            home_first_mean:0,
            away_count:0,
            away_first_mean:0,
        })
        const type:any = ref(nm_type);
        const position:any = ref({
            "G":"守门员","F":"前锋","D":"后卫","M":"中场"
        });
        const second_show:any = ref(false);
        const lineup_timer:any = ref(null);
        events.on('lineup', (data:any) => {  
            status_id.value = data.status_id;
            if(data.lineup && (data?.lineup?.home || data?.lineup?.away)){
                lineup.value = formatLineup(data.lineup)
                no_data.value = false;
            }else{
                no_data.value = true;
            }
        }); 

        const init_data = async() => {
            // if((props.activeName || route.name) =='GameLineup'){
                setTimeout(() => {
                    getDataNm();
                }, 300);
                loading.value = false;
            // }

            // 轮询比赛
            if (moment() > moment(game_info.value?.match_time) && moment() < moment(game_info.value?.match_time).add(150,'minutes')) {
                getIntervalLineup(status_id.value);
            }
        }

        onMounted(init_data);

        watch(() => route.query.yiqiuid || route.params.yiqiuid, (newVal: any) => {
            if (newVal && newVal != game_info.value.id) {
                console.info('lineup',newVal,game_info.value.id)
                init_data();
            }
        });

        onUnmounted(() => {   
            if(lineup_timer.value){
                clearInterval(lineup_timer.value);
            }
            events.off('lineup');  
        }); 

        const onRefresh = () => {
            setTimeout(() => {
                getDataNm();
                loading.value = false;
            }, 500);
        };

        const getDataNm = async()=>{
            if(!lineup.value){
                let yiqiu_id = game_info?.value?.id || route.query.yiqiuid || route.params.yiqiuid;
                let nm_result = await nm_match_api.nm_match_detail({yiqiu_id: yiqiu_id});
                if(nm_result && nm_result?.lineup && (nm_result?.lineup?.home || nm_result?.lineup?.away)){
                    lineup.value = formatLineup(nm_result.lineup)
                    no_data.value = false;
                }
            }
        };

        //nm轮询比赛
        const getIntervalLineup = (status:any) => {
            if(status){
                if (status == 1) {
                    lineup_timer.value = setInterval(async function () {
                        // console.info("lineup" , 'nm状态为1未开赛轮询3分钟一次')
                        await getLineupDataNm();
                    },  60 * 3 * 1000);
                }else if([2,4,5,6,7].includes(status)){
                    lineup_timer.value = setInterval(async function () {
                        // console.info('lineup35秒钟一次')
                        await getLineupDataNm();
                    }, 35 * 1000);
                }else{
                    clearInterval(lineup_timer.value);
                }
            }
        }

        const getLineupDataNm = async()=>{
            let yiqiu_id = game_info?.value?.id || route.query.yiqiuid || route.params.yiqiuid;
            let lineup_result = await nm_match_api.nm_match_lineup({yiqiu_id: yiqiu_id});
            if(lineup_result && (lineup_result?.home || lineup_result?.away)){
                lineup.value = formatLineup(lineup_result) ?? null;
            }
        };

        const formatLineup = (lineup:any)=>{
            if(lineup?.home){
                    let home = _.orderBy(lineup.home,'rating','desc');
                    let first = _.filter(home,item => item.first == 1);
                    team_rating.value.home_count = _.filter(home,item => item.rating > 0).length;
                    let first_mean = _.meanBy(first, function(o) { if(o.rating) return parseInt(o.rating); });
                    team_rating.value.home_first_mean = first_mean.toFixed(2);
                    let home_arr = [];
                    _.forEach(home,function(item:any){
                        item.name = getName(item.name);
                        item.shirt_number = item.shirt_number == 0 ? '-' : item.shirt_number;
                        //如果给的数据坐标有问题就不显示首发阵容
                        if(item.x != 0 && item.y != 0){
                            home_arr.push(item)
                        }
                        if(item.first == 0){
                            second_show.value = true;
                        }
                    })
                    lineup.home = home
                    if(home_arr.length == 0){
                        lineup.confirmed = -1;
                    }
            }
            if(lineup?.away){
                let away = _.orderBy(lineup.away,'rating','desc');
                let first = _.filter(away,item => item.first == 1);
                team_rating.value.away_count = _.filter(away,item => item.rating > 0).length;
                let first_mean = _.meanBy(first, function(o) { if(o.rating) return parseInt(o.rating); });
                team_rating.value.away_first_mean = first_mean?.toFixed(2);
                let away_arr = [];
                _.forEach(away,function(item:any){
                    item.name = getName(item.name);
                    item.shirt_number = item.shirt_number == 0 ? '-' : item.shirt_number;
                    //如果给的数据坐标有问题就不显示首发阵容
                    if(item.x != 0 && item.y != 0){
                        away_arr.push(item)
                    }
                    if(item.first == 0){
                        second_show.value = true;
                    }
                })
                lineup.away = away;
                if(away_arr.length == 0){
                    lineup.confirmed = -1;
                }
            }
            return lineup
        }
        const getName = (name:any) => {
            if(name.indexOf("·") > -1){
                let names = name.split('·')
                name = names[names.length-1];
            }
            return name;
        }
        const getIcon = (icon_name:any) => {
            return `../../assets/svg/sprite.svg#${icon_name}`;
        }

        return{
            no_data,
            loading,
            icon_list,
            type,
            position,
            game_info,
            game_detail,
            team_rating,
            second_show,
            player_default_img,
            lineup,
            onRefresh,
            getIcon,
            getTeamLazyErrorLogo,
        }
    }
})
</script>
<style lang="scss" scoped>
@use '@/common/style/common' as *;
body{
    text-align: left;
}
.title-lineup{
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    padding:0 10px;
    line-height: 30px;
}
.team-formation{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:10px;
    font-size: 14px;
    background-color: #A4D99C;
    .team-info{
        @include flex-center;
        img{
            width: 30px;
            border-radius: 50%;
        }
        .team-name{
            color:#000;
            font-size: 18px;
            font-weight: bold;
            margin-left: 10px;
        }
    }
    .team-rating{
        background-color: rgba(149, 203, 142, 1);
        color: rgba(58, 92, 54, 1);
        font-size: 12px;
        text-align: center;
        padding:0 10px;
        margin-top: 5px;
        border-radius: 15px;
        .fen{
            font-weight: bold;
            color:#000;
            padding:0 2px;
        }
    }
    .formation{
        display: block;
        font-size: 18px;
        font-weight: bold;
        color:#3A5C36;
    }
}
.first-lineup{
    @include back-img('../../assets/game/lineup_bg.jpg');
    height:880px;
    color:#fff;
    font-weight: 500;
    .home-lineup,.away-lineup{
       position: relative;
       height: 50%;
       .player{
            font-size: 12px;
            width:100%;
            position: absolute;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            -webkit-transform: translate(-50%, -50%);
            -moz-transform: translate(-50%, -50%);
            -o-transform: translate(-50%, -50%);
            .player-img{
                position: relative;
                background-color: #fff;
                background-repeat: no-repeat;
                background-position: 50%;
                background-size: contain;
                box-shadow: 0 0.533vw 1.067vw 0 rgba(36,77,0,.6);
                width: 40px;
                height: 36px;
                margin: 0 auto;
                border-radius: 5px;
                border-width: 0.533vw;
                border-style: solid;
                .img-top,.img-left{
                    position: absolute;
                    width: 18px;
                }
                .img-top{
                    top:-10px;
                    width: 90%;
                    margin-left: 5%;
                    .rating{
                        font-size: 12px;
                        height: 14px;
                        line-height: 14px;
                        border-radius: 6px;
                        background-color: green;
                        text-align: center;
                    }
                }
                .img-left{
                    bottom: 0;
                    left:-10px;
                    text-align: center;
                    .shirt-number{
                        border-radius: 50%;
                        font-size: 12px;
                        background-color:#34C094;
                        height: 16px;
                        width: 16px;
                    }
                }
                
            }
            .player-live{
                position: relative;
                .incident{
                    position: absolute;
                    width: 100%;
                    padding-top: 2px;
                    @include flex-center;
                    .icon{
                        width:12px;
                        height:12px;
                    }
                }
                .name{
                    font-size: 10px;
                    color:#333;
                    padding-top: 5px;
                    text-align: center;
                    .captain{
                        font-size: 8px;
                        border-radius: 2px;
                        color:#fff;
                        padding:0 3px;
                        text-align: center;
                        background-color: #E74C4C;
                    }
                }
            }
            
        }
        .away{
            transform: translate(-50%, 70%);
            -webkit-transform: translate(-50%, 70%);
            -moz-transform: translate(-50%, 70%);
            -o-transform: translate(-50%, 70%);
        }
    }
    
}
.second{
    margin-top: 10px;
    .match_team .match_team_container, .match_team {
        display: flex;
        align-items: center;
    }
    .match_team {
        -ms-flex-align: center;
        background: #f5f7f9;
        border-bottom: 1px solid #f5f7f9;
        
        .match_team_container{
            -webkit-box-flex: 1;
            -ms-flex: 1;
            flex: 1;
            -ms-flex-align: center;
            display: flex;
            align-items: center;
            padding: 10px;
            .team_logo{
                width: 26px;
                height: 26px;
                background-repeat: no-repeat;
                background-size: contain;
                background-position: 50%;
            }
            .team_name{
                align-items: flex-start;
                margin-left: 10px;
                font-size: 16px;
                font-weight: bold;
                color:#000;
            }
        }
    }
    .second-lineup{
        box-sizing: border-box;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        .home-lineup{
            border-right: solid 1px #f4f5f8;
        }
        .home-lineup,.away-lineup{
            flex: 1;
            .player-box{
                width: 100%;
                padding:0 10px;
                box-sizing: border-box;
                height: 50px;
                @include flex-center;
                border-bottom: 1px solid #f4f5f8;
                font-size: 12px;
                
                .player-left{
                    width: 30px;
                    color:#fff;
                    margin-right: 5px;
                    .player-img{
                        background: url(../../assets/game/coat.png) no-repeat 50%;
                        background-size: 100% 100%;
                        font-size: 14px;
                        width:30px;
                        height:30px;
                        @include flex-center;
                    }
                }
                .player-right{
                    flex:1;
                    display: flex;
                    width: 100%;
                    align-items: center;
                    justify-content: space-between;
                    .n-p-r{
                        text-align: left;
                        .position-icon{
                            display: flex;
                            align-items: center;
                            .icon{
                                width: 12px;
                                height: 12px;
                            }
                        }
                        .name{
                            color:#000;
                        }
                        .rating{
                            border-radius: 6px;
                            padding: 0 5px;
                            background-color: green;
                            color:#fff;
                            font-size: 12px;
                            height: 14px;
                            line-height: 14px;
                        }
                    }
                    .time-svg{
                        @include flex-center;
                    }
                    .time-svg .icon{
                        width:16px;
                    }
                }
            }
        }
    }
}

.icon-box{
    display: inline-block;
    width: 100%;
    padding-top:10px;
    padding-left:10px;
    .icon-son{
        color: #333;
        font-size: 12px;
        font-weight: 500;
        width: 20%;
        display: grid;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: start;
        align-items: center;
        float: left;
        margin-bottom: 10px;
        
        text-align: center;
        .icon-svg{
            @include flex-center;
        }
        .icon{
            width: 15px;
            height: 15px;
            margin-right: 3px;
        }
    }
}
</style>