p-honggang.li
2 天以前 349091f54dab47b15ca81613f02765490a2ce7d0
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
<!--
 * @Description: 
 * @Version: 2.0
 * @Autor: wuyun
 * @Date: 2024-06-21 09:37:45
 * @LastEditors: wuyun
 * @LastEditTime: 2024-09-06 16:45:02
-->
<template>
  <el-config-provider :locale="lang">
    <router-view v-if="isRouterAlive"></router-view>
  </el-config-provider>
</template>
<script setup lang="ts">
// import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as echarts from 'echarts'
import { provide } from 'vue'
import { useUserInfo } from '@/stores/modules/userInfo'
const userStore = useUserInfo()
provide('echarts', echarts)
 
const lang = zhCn
const isRouterAlive = ref(true)
const reload = () => {
  isRouterAlive.value = false
  nextTick(() => {
    isRouterAlive.value = true
  })
}
provide('reload', reload)
 
setInterval(() => {
// 这个判断代表登录成功后才开始写入时间
  if(userStore.getAdminToken) {
    localStorage.setItem('lastRecordTime', new Date().getTime().toString())
  }
}, 1000)
</script>
<style lang="scss">
@use './styles/vars.scss';
 
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
 
.el-dialog {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
 
.el-dialog__body {
  padding-top: 5px !important;
}
.videoResetDialog{
  .el-dialog__body {
    display: flex;
    align-items: center !important;
    justify-content: center !important;
  }
}
.resetDialog {
  width: 90vw !important;
  height:89.5vh !important;
  background-color: transparent !important;
  box-shadow: none !important;
 
  .el-dialog__body {
    overflow: auto;
    height: 100%;
    background-color: #2f2e2e;
    padding: 0 !important;
  }
  .el-dialog__header {
    margin-right: 0;
    padding: 10px 0px 10px 10px !important;
    background-color: #006bb8;
    .el-dialog__title {
      color: #fff !important;
      font-weight: 600;
    }
    .el-dialog__headerbtn {
      top: 15px ;
      right: 15px;
      .el-dialog__close {
        color: #fff !important;
        font-size: 20px !important;
      }
    }
  }
  .el-dialog__footer {
    padding: 0 !important;
  }
}
ul li {
  list-style-type: none;
  list-style: none;
}
 
.el-tooltip__popper {
  max-width: 60vw !important;
}
.el-tooltip__popper,
.el-tooltip__popper.is-dark {
  max-width: 60% !important;
  line-height: 24px;
}
 
// 苹果电脑列没对齐
.el-table {
  border-collapse: collapse;
}
.rowBtnDiv .normal-btn,.action-btns .normal-btn{
    padding: 8px 4px !important;
  }
/* Tooltip 宽度与换行控制(Element Plus Teleport 到 body,需要 deep 选择器) */
.tooltip-wrap{
  max-width: 340px !important;
}
.tooltip-wrap .el-tooltip__content {
  max-width: 340px !important;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}
</style>