charles
2024-05-06 bad4f431d9287c31da042ada125910e9b3e8c3b8
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
<template>
    <div>
        <div class="search">
            <el-form :inline="true" class="demo-form-inline">
                <el-form-item label="">
                    <el-input v-model="whereCar.keyword" size="small" placeholder="请输入司机,车次,车号等关键字进行搜索" style="width: 300px"></el-input>
                </el-form-item>
                <el-form-item label="">
                    <el-date-picker
                            v-model="whereCar.date"
                            type="daterange"
                            size="small"
                            align="right"
                            unlink-panels
                            range-separator="至"
                            start-placeholder="开始日期"
                            end-placeholder="结束日期"
                            :picker-options="pickerOptions">
                    </el-date-picker>
                </el-form-item>
                <el-form-item>
                    <el-button  @click="searchCar" size="mini" type="primary" style="border:none;background-color: rgba(24, 144, 255, 1)">搜索</el-button>
                </el-form-item>
            </el-form>
        </div>
        <div class="show-sel-tag">
            <div>
                已选条件:
                <span v-if="tagList.length>0">
                    <el-tag  class="tag-cla" effect="plain" closable v-for="(tag,index) in tagList" @close="closeTag(index)">
                        <span>{{tag.filterType}}:</span> <span style="color: red">{{tag.value}}</span>
                    </el-tag>
                </span>
                <span v-else style="color: lightgray;font-size: 12px">还未选择筛选条件</span>
            </div>
            <div>
                <el-button size="mini" @click="cancelSel">取消选择</el-button>
            </div>
        </div>
        <div class="sel-filter">
            <div class="item-car-no">
                <div class="title">车号:</div>
                <div class="list">
                    <div class="default">
                        <div v-for="(carNo,index) in carNoList" v-if="index<=(carNoBtn.moreStatus?carNoList.length-1:9)">
                            <el-checkbox v-show="carNoBtn.manySel" checked/>{{carNo}}
                        </div>
                        <div style="width: 100%;text-align: center" v-show="carNoBtn.manySel">
                            <el-button type="primary" size="mini">确定</el-button>
                            <el-button size="mini" @click="cancelManySel">取消</el-button>
                        </div>
                    </div>
                    <div class="btn">
                        <el-button size="mini" @click="carNoBtn.moreStatus=!carNoBtn.moreStatus">更多<i :class="carNoBtn.moreStatus?'el-icon-arrow-up':'el-icon-arrow-down'"></i></el-button>
                        <el-button size="mini" @click="manySelect">多选<i class="el-icon-plus"></i></el-button>
                    </div>
                </div>
            </div>
            <div class="item-car-no">
                <div class="title">车次:</div>
                <div class="list" style="border-top: none">
                    <div class="default">
                        <div v-for="(carTime,index) in carTimeList" v-if="index<=(carTimeBtn?carTimeList.length-1:9)">
                            {{carTime}}
                        </div>
                    </div>
                    <div class="btn">
                        <el-button size="mini" @click="carTimeBtn=!carTimeBtn">更多<i :class="carTimeBtn?'el-icon-arrow-up':'el-icon-arrow-down'"></i></el-button>
                    </div>
                </div>
            </div>
            <div class="item-car-no">
                <div class="title">车站号:</div>
                <div class="list" style="border-top: none">
                    <div class="default">
                        <div v-for="(carState,index) in carStateList" v-if="index<=(carStateBtn?carStateList.length-1:9)">{{carState}}</div>
                    </div>
                    <div class="btn">
                        <el-button size="mini" @click="carStateBtn=!carStateBtn">更多<i :class="carStateBtn?'el-icon-arrow-up':'el-icon-arrow-down'"></i></el-button>
                    </div>
                </div>
 
            </div>
        </div>
        <div class="audio-filter">
            <div>
                <el-select size="mini" v-model="whereAudio.isState">
                    <el-option value="0" label="未关注"></el-option>
                    <el-option value="1" label="已关注"></el-option>
                    <el-option value="2" label="全部"></el-option>
                </el-select>
                <el-select size="mini" style="margin-left: 10px" v-model="whereAudio.status">
                    <el-option value="0" label="正常"></el-option>
                    <el-option value="1" label="异常"></el-option>
                    <el-option value="2" label="全部"></el-option>
                </el-select>
            </div>
            <div class="icon">
                <div @click="audioListType='table'" :class="{'border-cla':audioListType==='table'}">
                    <img :src="`${publicPath}images/audio/u167.png`" width="13px"/>
                </div>
                <div @click="audioListType='menu'" :class="{'border-cla':audioListType==='menu'}">
                    <img :src="`${publicPath}images/audio/u168.png`" />
                </div>
            </div>
        </div>
        <div v-if="audioListType=='table'" class="audio-list-table">
            <div class="item"   v-for="i in 8">
                <div class="head" @click="modalAudio=true">
                    <img :src="`${publicPath}images/audio/u230.png`"/>
                    <img :src="`${publicPath}images/audio/u231.png`" class="player"/>
                    <div class="time">06:20</div>
                </div>
                <div class="body">
                    <div class="carNo">
                        <div>
                            车号:SS4B115<br/>
                            车次:8040<br>
                            时间:2020-09-21 20:45:08<br/>
                            司机:A20<br>
                        </div>
                        <div class="status">异常</div>
                    </div>
                    <div style="text-align: right;margin-right: 10px">
                        <el-rate :max="1"></el-rate>
                    </div>
                    <div class="tag">
                        <div>火车到站</div>
                        <div>火车启动</div>
                        <div>火车鸣笛</div>
                    </div>
                </div>
            </div>
        </div>
        <div v-else class="audio-list-menu">
            <el-table :data="audioList">
                <el-table-column prop="name" label="名称" align="center"></el-table-column>
                <el-table-column prop="size" label="大小" align="center"></el-table-column>
                <el-table-column prop="tag" label="标签" align="center"></el-table-column>
                <el-table-column prop="editDate" label="修改时间" align="center"></el-table-column>
                <el-table-column prop="createDate" label="创建时间" align="center"></el-table-column>
                <el-table-column  label="操作" align="center">
                    <el-rate max="1"></el-rate>
                </el-table-column>
            </el-table>
        </div>
        <div class="audio-pagination">
            <div class="total">共计{{pageInfo.total}}条记录 第{{pageData.page}}/{{lastPage}}页</div>
            <div class="page">
                <el-pagination
                        background
                        @size-change="handleSizeChange"
                        @current-change="handleCurrentChange"
                        :current-page.sync="pageData.page"
                        :page-size="pageData.pageSize"
                        layout="prev, pager, next,sizes, jumper"
                        :total="pageInfo.total">
                </el-pagination>
            </div>
        </div>
        <Analysis :modal-audio.sync="modalAudio"></Analysis>
    </div>
</template>
 
<script>
    import Analysis from './components/Analysis.vue';
    export default {
        name: "audioAnalysis",
        components:{
            Analysis
        },
        data(){
            return {
                publicPath: process.env.BASE_URL,
                modalAudio:false,
                pageInfo:{
                    total:100,
                    textList:[]
                },
                pageData:{page:1,pageSize:10},
                whereAudio:{
                  status:'2',
                  isState:'2'
                },
                audioListType:'table',
                carNoBtn:{
                  moreStatus:false,
                  manySel:false
                },
                carTimeBtn:false,
                carStateBtn:false,
                whereCar:{
                    keyword:'',
                    date:''
                },
                tagList:[
                    {filterType:'车次',value:'全部'},
                    {filterType:'车号',value:'全部'},
                    {filterType:'车站号',value:'全部'}
                ],
                pickerOptions: {
                    shortcuts: [
                        {
                        text: '最近一周',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近一个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
                carNoList:['全部','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24'],
                carTimeList:['全部','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24'],
                carStateList:['全部','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24','K24'],
                audioList:[
                    {name: '王小虎1', size:'100MB', tag:'火车出站', createDate: '2016-05-02', editDate:'2016-05-02'},
                    {name: '王小虎2', size:'100MB', tag:'火车出站', createDate: '2016-05-02', editDate:'2016-05-02'},
                    {name: '王小虎3', size:'100MB', tag:'火车出站', createDate: '2016-05-02', editDate:'2016-05-02'},
                    {name: '王小虎4', size:'100MB', tag:'火车出站', createDate: '2016-05-02', editDate:'2016-05-02'},
                    {name: '王小虎5', size:'100MB', tag:'火车出站', createDate: '2016-05-02', editDate:'2016-05-02'},
                    {name: '王小虎6', size:'100MB', tag:'火车出站', createDate: '2016-05-02', editDate:'2016-05-02'},
                    {name: '王小虎7', size:'100MB', tag:'火车出站', createDate: '2016-05-02', editDate:'2016-05-02'}
                ]
            }
        },
        computed:{
            lastPage(){
                return Math.ceil(this.pageInfo.total/this.pageData.pageSize)
            }
        },
        methods:{
            handleSizeChange(pageSize){
                this.pageData.pageSize=pageSize;
            },
            handleCurrentChange(page){
                this.pageData.page=page;
            },
            manySelect(){
              this.carNoBtn.manySel=true;
              this.carNoBtn.moreStatus=true;
            },
            searchCar(){
 
            },
            cancelManySel(){
              this.carNoBtn.manySel=false;
              this.carNoBtn.moreStatus=false;
            },
            cancelSel(){
                this.tagList=[];
            },
            closeTag(index){
                this.tagList.splice(index,1);
            }
        }
    }
</script>
 
<style scoped lang="scss">
    .show-sel-tag{
        display: flex;
        justify-content: space-between;
        .tag-cla{
            margin-left: 5px;
        }
    }
    .sel-filter{
        margin-top: 20px;
        .item-car-no{
            display: flex;
            justify-content: space-between;
            line-height: 40px;
            .title{
                padding-left: 20px;
                width: 10%;
                background-color: lightgray;
            }
            .list{
                display: flex;
                width: 90%;
                border:1px solid lightgray ;
                .default{
                    width: 80%;
                    display: flex;
                    justify-content: flex-start;
                    flex-wrap: wrap;
                    color: deepskyblue;
                    div{
                        width: 10%;
                        text-align: center;
                    }
                    div:hover{
                        color: red;
                        cursor: pointer;
                    }
                }
                .btn{
                    text-align: right;
                    padding-right: 10px;
                    width: 20%;
                }
            }
        }
    }
    .audio-filter{
        margin-top: 20px;
        display: flex;
        justify-content: space-between;
        .icon{
            display: flex;
            div{
                width:24px;
                height: 24px;
                text-align: center;
                line-height: 24px;
                border: 1px solid lightgray;
                margin-left:10px;
                &:hover{
                    cursor: pointer;
                }
            }
            .border-cla{
                border: 1px solid blue;
            }
        }
    }
    .audio-list-table{
        margin-top: 20px;
        display: flex;
        flex-wrap: wrap;
        justify-content: start;
        .item{
            width: 25%;
            margin-top: 10px;
            .head{
                position: relative;
                .player{
                    position: absolute;
                    z-index: 5;
                    top:20px;
                    left:80px;
                }
                .time{
                    font-size: 12px;
                    position: absolute;
                    z-index: 5;
                    left:210px;
                    bottom:20px;
                    color: white;
                    background-color: gray;
                    width: 50px;
                    text-align: center;
                    line-height: 20px;
                    border-radius: 15px;
                }
            }
            .body{
                width: 278px;
                border: 1px solid lightgray;
                border-radius: 0px 0px 5px 5px;
                border-top: none;
                margin-top: -10px;
                .carNo{
                    box-sizing: border-box;
                    padding-top: 10px;
                    padding-left: 10px;
                    display: flex;
                    font-size: 14px;
                    justify-content: space-between;
                    .status{
                        margin-right: 20px;
                        color: red;
                    }
                }
                .tag{
                    display: flex;
                    justify-content: start;
                    margin-bottom: 30px;
                    div{
                        width: 70px;
                        font-size: 12px;
                        background-color: rgba(242, 242, 242, 1);
                        margin-left: 10px;
                        text-align: center;
                        color: gray;
                    }
                }
            }
        }
    }
    .audio-pagination{
        display: flex;
        justify-content: space-between;
        margin-top: 30px;
        .total{
            color: gray;
        }
    }
</style>