@extends('admin.layouts.app')

@section('content')
    <div class="row">
        <div class="ibox-content">
            <div class="form-group">
                <div class="row">
                    <div class="col-sm-4">

                        <div class="form-group row">

                            <label class="col-form-label col-sm-3">完整录音：</label>

                            <div class="col-sm-9">
                                <audio src="http://{{ $data->record_path }}" controls="controls">
                                </audio>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

            <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
                <thead>
                <tr>
                    <th> ID</th>
                    <th> 呼叫标识</th>
                    <th> 机器人</th>
                    <th> 被叫用户</th>
                    <th> 节点名字</th>
                    <th> 纪录时间</th>
                    <th> 录音地址</th>

                </tr>
                </thead>
                <tbody>
                @if(isset($list))
                    @foreach($list as $key => $item)
                        <tr>
                            <td> {{ $item->id  }}</td>
                            <td> {{ $item->call_id  }}</td>
                            <td> {{ $item->ai_speak  }}</td>
                            <td> {{ $item->people_speak  }}</td>
                            <td> {{ $item->node_name  }}</td>
                            <td> {{ $item->flow_time  }}</td>
                            <td> @if($item->voice_path)<audio src="http://{{ $item->voice_path }}" controls="controls">
                                </audio> @endif</td>

                        </tr>
                    @endforeach
                @endif

                </tbody>
            </table>
        </div>
    </div>
@endsection