index.vue 17.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<template>
    <div  style="width: 100vw;height: 100%vh;background: rgb(247, 247, 247);">
        <div class="entrance">
            <div class="entrance-l">
                <div class="entrance-l-t">
                    <div class="ent-l ent">
                        <span>人员出入</span>
                        <div class="ent-div"></div>
                        <div class="ent-ruchang">
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/Shape.png" alt="">
                                </div>
                                <div class="ru-in-r">
                                    <span>入场</span>
耿迪迪's avatar
耿迪迪 committed
16
                                    <div style="color: #0fb980;">{{importCount?importCount:0}}</div>
17 18 19 20 21 22 23
                                </div>
                            </div>
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/11.png" alt="">
                                </div>
                                <div class="ru-in-r">
yaqizhang's avatar
yaqizhang committed
24
                                    <span>出场</span>
耿迪迪's avatar
耿迪迪 committed
25
                                    <div style="color: #f95f5f;">{{exportCount?exportCount:0}}</div>
26 27 28 29 30 31 32
                                </div>
                            </div>
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/user.png" alt="">
                                </div>
                                <div class="ru-in-r">
yaqizhang's avatar
yaqizhang committed
33
                                    <span>在场</span>
耿迪迪's avatar
耿迪迪 committed
34
                                    <div style="color: #3a65ed">{{stayInCount?stayInCount:0}}</div>
yaqizhang's avatar
yaqizhang committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="ent-l ent">
                        <span>车辆出入</span>
                        <div class="ent-div"></div>
                        <div class="ent-ruchang">
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/Group 1.png" alt="">
                                </div>
                                <div class="ru-in-r">
yaqizhang's avatar
yaqizhang committed
49
                                    <span>入场</span>
yaqizhang's avatar
yaqizhang committed
50 51 52 53 54 55 56 57
                                    <div style="color: #0fb980;">0</div>
                                </div>
                            </div>
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/Gr.png" alt="">
                                </div>
                                <div class="ru-in-r">
yaqizhang's avatar
yaqizhang committed
58
                                    <span>出场</span>
yaqizhang's avatar
yaqizhang committed
59 60 61 62 63 64 65 66
                                    <div style="color: #f95f5f;">0</div>
                                </div>
                            </div>
                            <div class="ent-ru-in">
                                <div class="ru-in-l">
                                    <img src="../../assets/img/Group.png" alt="">
                                </div>
                                <div class="ru-in-r">
yaqizhang's avatar
yaqizhang committed
67
                                    <span>在场</span>
68 69 70 71 72
                                    <div style="color: #3a65ed">0</div>
                                </div>
                            </div>
                        </div>
                    </div>
耿迪迪's avatar
耿迪迪 committed
73

yaqizhang's avatar
yaqizhang committed
74
                    <!-- <div class="ent-r ent">
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
                        <span>车辆出入</span>
                        <div class="ent-div"></div>
                        <div class="ent-r-car">
                            <div class="r-car-in">
                                <img src="../../assets/img/Group 1.png" alt="">
                                <div>车辆进场</div>
                                <p style="color: #07b9b9;">0</p>
                            </div>
                            <div class="r-car-in">
                                <img src="../../assets/img/Gr.png" alt="">
                                <div>车辆进场</div>
                                <p style="color: rgb(250 81 81);">0</p>
                            </div>
                            <div class="r-car-in">
                                <img src="../../assets/img/Group.png" alt="">
                                <div>车辆进场</div>
                                <p style="color: rgb(54 98 236);">0</p>
                            </div>
                        </div>
yaqizhang's avatar
yaqizhang committed
94 95 96 97 98
                    </div> -->
                </div>

                <div class="entrance-l-a">
                    <div class="ent-b-car1">
yaqizhang's avatar
yaqizhang committed
99
                        <span>人员入场</span>
yaqizhang's avatar
yaqizhang committed
100 101 102 103 104 105
                        <div class="ent-div"></div>
                        <div class="ent-b-in">
                            <div class="a-in1">
                                <img src="../../assets/img/biguser.png" alt="">
                            </div>
                            <div class="a-in2">
耿迪迪's avatar
耿迪迪 committed
106 107 108
                                <div>人员姓名:<span>{{lastImportData?lastImportData.personName:"-"}}</span> </div>
                                <div>员工ID:<span>{{lastImportData?lastImportData.personNum:"-"}}</span> </div>
                                <div>入场时间:<span>{{lastImportData?lastImportData.actionTime:"-"}}</span> </div>
yaqizhang's avatar
yaqizhang committed
109 110 111 112 113 114 115 116 117 118 119 120 121 122
                            </div>
                        </div>
                    </div>
                    <div class="ent-b-car1">
                        <div class="a-car-out">
                            <div>人员出场</div>
                            <div style="color: #c5c6c7;font-size: 14px;">出入记录</div>
                        </div>
                        <div class="ent-div"></div>
                        <div class="ent-b-in">
                            <div class="a-in1">
                                <img src="../../assets/img/biguser.png" alt="">
                            </div>
                            <div class="a-in2">
耿迪迪's avatar
耿迪迪 committed
123 124 125
                                <div>人员姓名:<span>{{lastExportData?lastExportData.personName:"-"}}</span> </div>
                                <div>员工ID:<span>{{lastExportData?lastExportData.personNum:"-"}}</span> </div>
                                <div>出场时间:<span>{{lastExportData?lastExportData.actionTime:"-"}}</span> </div>
yaqizhang's avatar
yaqizhang committed
126 127
                            </div>
                        </div>
128 129
                    </div>
                </div>
yaqizhang's avatar
yaqizhang committed
130

131 132
                <div class="entrance-l-b">
                    <div class="ent-b-car1">
yaqizhang's avatar
yaqizhang committed
133
                        <span>车辆入场</span>
134 135 136 137
                        <div class="ent-div"></div>
                        <div class="ent-b-in">
                            <img src="../../assets/img/car.png" alt="">
                            <div>车辆类型:<span></span> </div>
yaqizhang's avatar
yaqizhang committed
138 139
                            <div>车辆号牌:<span></span> </div>
                            <div>入场时间:<span></span> </div>
140 141 142
                        </div>
                    </div>
                    <div class="ent-b-car1">
yaqizhang's avatar
yaqizhang committed
143 144 145 146
                        <div class="a-car-out">
                            <div>车辆出场</div>
                            <div style="color: #c5c6c7;font-size: 14px;">出入记录</div>
                        </div>
147 148 149 150
                        <div class="ent-div"></div>
                        <div class="ent-b-in">
                            <img src="../../assets/img/car.png" alt="">
                            <div>车辆类型:<span></span> </div>
yaqizhang's avatar
yaqizhang committed
151 152
                            <div>车辆号牌:<span></span> </div>
                            <div>入场时间:<span></span> </div>
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
                        </div>
                    </div>
                </div>
            </div>
            <div class="entrance-r">
                <span>园区内车辆</span>
                <div class="ent-div"></div>
                <div class="ent-yuanqu">
                    <el-table
                    :data="tableData"
                    style="width: 100%">
                    <el-table-column
                        prop="date"
                        label="车牌号"
                        width="170">
                    </el-table-column>
                    <el-table-column
                        prop="name"
                        label="类型">
                    </el-table-column>
                    <el-table-column
                        prop="address"
yaqizhang's avatar
yaqizhang committed
175
                        label="入场时间"
176 177 178 179 180 181 182 183 184
                        width="200">
                    </el-table-column>
                    </el-table>
                    <!-- <el-pagination
                        layout="prev, pager, next"
                        :total="1000">
                    </el-pagination> -->
                </div>
            </div>
耿迪迪's avatar
耿迪迪 committed
185

186 187
        </div>
    </div>
耿迪迪's avatar
耿迪迪 committed
188

189
  </template>
耿迪迪's avatar
耿迪迪 committed
190

191
  <script>
耿迪迪's avatar
耿迪迪 committed
192
    import { getEntranceGuardPersonInfo } from "@/api/entranceguard/entranceguardPerson"
193
  export default {
yaqizhang's avatar
yaqizhang committed
194
    name: "",
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
    data() {
        return {
          tableData: [
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
            // { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
耿迪迪's avatar
耿迪迪 committed
214 215 216 217 218 219 220 221 222 223 224
        ],
          //入场人数
          exportCount:"",
          //出场人数
          importCount:"",
          //在场人数
          stayInCount:"",
          //最新入场信息
          lastImportData:{},
          //最新出场信息
          lastExportData:{}
225
        }
耿迪迪's avatar
耿迪迪 committed
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
      },
    created(){
      this.initPersonData();
    },
    methods:{
      initPersonData(){
        getEntranceGuardPersonInfo().then(res =>{
          //入场人数
          this.importCount = res.data.importCount;
          //出场人数
          this.exportCount = res.data.exportCount;
          //在场人数
          this.stayInCount = res.data.stayInCount;
          //最新入场信息
          this.lastImportData = res.data.lastImportData;
          //最新出场信息
          this.lastExportData = res.data.lastExportData;
        })
244
      }
耿迪迪's avatar
耿迪迪 committed
245
    }
246 247 248 249 250
  };
  </script>
  <style lang="scss" scoped>
    .entrance{
        width: 85%;
yaqizhang's avatar
yaqizhang committed
251
        height: calc(100vh - 50px);
252 253 254 255 256 257 258 259 260
        padding: 30px;
        display: flex;
        justify-content: space-between;
        .entrance-l{
            width: 60%;
            height: 100%;
            /* padding: 20px; */
            .entrance-l-t{
                width: 100%;
yaqizhang's avatar
yaqizhang committed
261
                height: 20%;
262 263 264 265 266 267 268 269 270 271 272 273 274
                display: flex;
                justify-content: space-between;
                .ent{
                    width: 48%;
                    height: 100%;
                    border-radius: 7px;
                    background: #fff;
                    padding: 20px;
                }
                .ent-l{
                    .ent-ruchang{
                        width: 100%;
                        height: 100%;
yaqizhang's avatar
yaqizhang committed
275 276 277
                        padding-top: 10px;
                        display: flex;
                        justify-content: space-between;
耿迪迪's avatar
耿迪迪 committed
278

279 280 281 282 283 284
                        .ent-ru-in{
                            width: 100%;
                            height: 30%;
                            display: flex;
                            margin-top: 4%;
                            .ru-in-l{
yaqizhang's avatar
yaqizhang committed
285 286
                                width: 50px;
                                height: 50px;
287 288
                                border-radius: 50px;
                                background: rgb(247, 247, 247);
yaqizhang's avatar
yaqizhang committed
289
                                line-height: 55px;
290
                                text-align: center;
yaqizhang's avatar
yaqizhang committed
291
                                margin-top: 10px;
292 293 294 295 296 297
                                img{
                                    width: 35%;
                                }
                            }
                            .ru-in-r{
                                padding: 7px 0 0 10px;
yaqizhang's avatar
yaqizhang committed
298 299 300
                                span{
                                    font-size: 15px;
                                }
301
                                div{
yaqizhang's avatar
yaqizhang committed
302
                                    font-size: 25px;
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
                                    margin-top: 7px;
                                }
                            }
                        }
                    }
                }
                .ent-r{
                    .ent-r-car{
                        width: 100%;
                        height: 95%;
                        display: flex;
                        justify-content: space-around;
                        .r-car-in{
                            width: 25%;
                            height: 60%;
                            margin-top: 20%;
                            background-color: rgb(247, 247, 247);
                            border-radius: 15px;
                            text-align: center;
                            img{
                                margin-top: 40%;
                            }
                            p{
                                margin-top: 40%;
                                font-size: 30px;
                            }
                        }
                    }
                }
            }
yaqizhang's avatar
yaqizhang committed
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
            .entrance-l-a{
                width: 100%;
                height: 27%;
                margin-top: 2%;
                border-radius: 7px;
                background: #fff;
                display: flex;
                justify-content: space-between;
                .ent-b-car1{
                    width: 47%;
                    height: 90%;
                    padding: 20px;
                    .a-car-out{
                        width: 100%;
                        display: flex;
                        justify-content: space-between;
                    }
                    .ent-b-in{
                        padding: 7% 20px 20px 20px;
                        display: flex;
                        justify-content: space-between;
                        width: 100%;
                        height: 100%;
                        .a-in1{
                            width: 30%;
                            height: 100%;
                            img{
                                width: 100%;
                            }
                        }
                        .a-in2{
                            width: 65%;
                            height: 90%;
                            display: flex;
                            flex-direction:column;
                            align-content: flex-end;
                            div{
                                font-size: 15px;
                                span{
                                    color: #a39e9e;
                                }
                            }
                            div:nth-child(2){
                                margin-top: 35px;
                            }
                            div:last-child{
                                margin-top: 35px;
                            }

                        }
耿迪迪's avatar
耿迪迪 committed
383

yaqizhang's avatar
yaqizhang committed
384 385 386
                    }
                }
            }
387 388 389 390 391 392 393 394 395 396 397 398
            .entrance-l-b{
                width: 100%;
                height: 49%;
                margin-top: 2%;
                border-radius: 7px;
                background: #fff;
                display: flex;
                justify-content: space-between;
                .ent-b-car1{
                    width: 47%;
                    height: 90%;
                    padding: 20px;
yaqizhang's avatar
yaqizhang committed
399 400 401 402 403
                    .a-car-out{
                        width: 100%;
                        display: flex;
                        justify-content: space-between;
                    }
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
                    .ent-b-in{
                        padding: 30px 20px;
                        img{
                            width: 100%;
                        }
                        div{
                            margin-top: 20px;
                            span{
                                color: #a39e9e;
                            }
                        }
                    }
                }
            }
        }
        .entrance-r{
            width: 38%;
            height: 100%;
            background: #fff;
            border-radius: 7px;
            padding: 20px;
            .ent-yuanqu{
                width: 100%;
                height: 95%;
                padding: 10px;
                text-align: center;
            }
        }
    }
耿迪迪's avatar
耿迪迪 committed
433

434 435 436
.ent-div{
   width: 100%;
   height: 1px;
耿迪迪's avatar
耿迪迪 committed
437 438
   background-color: rgb(205, 207, 209);
   margin-top: 7px;
439 440 441 442 443 444 445
}
::v-deep .el-table th > .cell {
    text-align: center;
}
::v-deep .el-table tr td .cell {
    text-align: center;
}
耿迪迪's avatar
耿迪迪 committed
446
  </style>