Browse Source

首页默认

master
maochaoying 2 years ago
parent
commit
9775ab7cf7
  1. 43
      src/components/Image.vue
  2. 14
      src/pages/index.vue
  3. 4
      src/store/modules/task.js

43
src/components/Image.vue

@ -1,26 +1,6 @@
<template> <template>
<div class="no_image" v-if="true">
<div class="box">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="90.51795196533203"
height="72.12825012207031"
viewBox="0 0 90.51795196533203 72.12825012207031"
>
<g>
<path
d="M5.47832,1.07084C4.33577,2.37537,4.46758,4.35924,5.77267,5.50116L5.7758,5.50116L10.2452,9.41187L9.40736,9.41187C4.21182,9.41187,0,13.6237,0,18.8193L0,59.7194C0,64.915,4.21182,69.1268,9.40736,69.1268L54.1237,69.1268C59.3192,69.1268,63.5311,64.915,63.5311,59.7194L63.5311,56.0371L81.0347,71.3529C82.3389,72.4929,84.3202,72.3604,85.461,71.0569C86.6018,69.7533,86.4705,67.772,85.1677,66.6304L9.90877,0.778648C8.6048,-0.364539,6.62087,-0.2337,5.47832,1.07084ZM57.2595,50.5495L17.4127,15.6835L9.40736,15.6835C7.67552,15.6835,6.27158,17.0874,6.27158,18.8193L6.27158,59.7194C6.27158,61.4513,7.67552,62.8552,9.40736,62.8552L54.1237,62.8552C55.8555,62.8552,57.2595,61.4513,57.2595,59.7194L57.2595,50.5495ZM63.6998,30.6292L63.691,30.6161C63.6408,30.6506,63.575,30.682,63.5342,30.7039L63.5342,18.8193C63.5342,13.6237,59.3224,9.41187,54.1268,9.41187L33.9449,9.41187L33.9449,15.6835L54.1268,15.6835C55.8587,15.6835,57.2626,17.0874,57.2626,18.8193L57.2626,30.7478C57.2626,34.2115,60.0705,37.0194,63.5342,37.0194C64.7585,37.0194,66.0447,36.5632,67.0818,35.8931L67.0933,35.9093L67.0933,35.9125L83.9889,23.9149L84.2461,53.567L88.5421,58.139C89.818,56.941,90.5344,55.2638,90.5177,53.5137L90.2605,23.8616C90.2411,21.5248,88.9241,19.3927,86.8433,18.3292C84.7625,17.2657,82.2629,17.4473,80.3577,18.8004L63.6998,30.6292Z"
fill-rule="evenodd"
fill="#000000"
fill-opacity="1"
/>
</g>
</svg>
<p class="text">未检测到摄像设备</p>
</div>
<div class="no_image" v-if="taskStore.currentTaskId == null">
<div class="box"></div>
</div> </div>
<div class="image_container" v-else> <div class="image_container" v-else>
<!-- <img :src="I1" alt="图像" class="img" /> --> <!-- <img :src="I1" alt="图像" class="img" /> -->
@ -53,6 +33,8 @@
<script setup> <script setup>
import I1 from '@/static/img/login/back.png' import I1 from '@/static/img/login/back.png'
import { useTaskStore } from '@/store'
const taskStore = useTaskStore()
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -61,22 +43,7 @@ import I1 from '@/static/img/login/back.png'
height: 100%; height: 100%;
border-radius: 6px; border-radius: 6px;
overflow: hidden; overflow: hidden;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
.box {
display: flex;
flex-direction: column;
align-items: center;
.text {
margin-top: 35px;
font-size: 30px;
font-weight: bold;
letter-spacing: 0.07em;
color: #000000;
}
}
background: #ebebeb;
} }
.image_container { .image_container {
width: 100%; width: 100%;

14
src/pages/index.vue

@ -194,7 +194,11 @@
<Excel :excelData="taskStore.excelData" /> <Excel :excelData="taskStore.excelData" />
</div> </div>
<div class="bottom_operation_container ignore-height"> <div class="bottom_operation_container ignore-height">
<div class="auto_btn">
<div
:class="
taskStore.currentTaskId == null ? 'auto_btn cant_btn' : 'auto_btn'
"
>
<p class="title">[开启]自动核查</p> <p class="title">[开启]自动核查</p>
<div class="icon_box"> <div class="icon_box">
<svg <svg
@ -284,7 +288,7 @@ const logout = () => {
} }
onMounted(async () => { onMounted(async () => {
taskStore.getExcelList(1)
// taskStore.getExcelList(1)
}) })
</script> </script>
@ -405,6 +409,12 @@ onMounted(async () => {
border-radius: 6px; border-radius: 6px;
} }
} }
.cant_btn {
background: #e8e8e8;
.icon_box {
background: #e2e2e2;
}
}
} }
@media screen and (max-height: 1000px) { @media screen and (max-height: 1000px) {
.bottom_operation_container { .bottom_operation_container {

4
src/store/modules/task.js

@ -6,10 +6,14 @@ export const useTaskStore = defineStore({
return { return {
type: 0, // 0为实时数据 1为历史数据 type: 0, // 0为实时数据 1为历史数据
excelData: [], excelData: [],
currentTaskId: null,
} }
}, },
// actions // actions
actions: { actions: {
updateCurrentTaskId(currentTaskId) {
this.currentTaskId = currentTaskId
},
updateType(type) { updateType(type) {
this.type = type this.type = type
}, },

Loading…
Cancel
Save