美文网首页
2022-08-05(ng循环table 合并单元格)

2022-08-05(ng循环table 合并单元格)

作者: 依然_bc87 | 来源:发表于2022-08-16 11:54 被阅读0次

参考地址:

https://www.php.cn/js-tutorial-409492.html

自己主要代码:(注意 在代码中提炼最核心哈)

if(res.status==0){

layer.close(loadIdx)

    console.log( res.data.detailVOList,'人脸识别结果list')

var list = []

$.each(res.data.detailVOList,function (index,item) {

for(var i=0;i

if(list[i].recognitionNo === item.recognitionNo){

list[i].fileList.push(item);

return;

            }

}

list.push({

recognitionNo:item.recognitionNo,

            verifyResult:item.verifyResult,

            verifyCount:item.verifyCount,

            fileList:[item]

});

    })

console.log(list,'list====')

$scope.faceCheckResultList = list

faceCheckLayer =layer.open({

type:1,

        skin:'layui-layer-rim',

        area: ['50%', ''],

        offset:'100px',

        title:"人脸比对",

        content:$('#faceCheck1')

});

    $("#faceCheck1").parent().css('maxHeight',600)

}else{

layer.msg(res.message)

layer.close(loadIdx)

}

<table class="table table-bordered">

        <th>考试阶段

        <th>识别次序

        <th>照片

        <th>设备信息

        <th>比对时间

        <th>比对状态

        <th>比对结果

        <th>比对次数

    <tbody ng-repeat="file in faceCheckResultList">

    <tr ng-repeat="item in file.fileList">

        <td ng-if="$index ==0 " rowspan="{{file.fileList.length}}">

            <span ng-if="file.recognitionNo == 1">考试前

            <span ng-if="file.recognitionNo == 11">考试中

            <span ng-if="file.recognitionNo == 2">考试后

        <td>第{{$index+1}}次

            <img style="width:50px;height:50px" src="{{item.testImgUrl}}"/>

            <span>{{item.deviceName}}

        <td>{{item.ctime}}

            <span ng-if="item.resultState == 0">不通过

            <span ng-if="item.resultState == 1">通过

        <td ng-if="$index ==0 " rowspan="{{file.fileList.length}}">

            <span ng-if="file.verifyResult == 0">不通过

            <span ng-if="file.verifyResult == 1">通过

        <td ng-if="$index ==0 " rowspan="{{file.fileList.length}}">{{file.verifyCount}}

</table>

最终效果

相关文章

网友评论

      本文标题:2022-08-05(ng循环table 合并单元格)

      本文链接:https://www.haomeiwen.com/subject/elypwrtx.html