Main.vue
5.79 KB
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
<template>
<el-container>
<el-header style="background: black">
<el-row style="height: 100%">
<el-col :span="2">
<div class="flex-vertical-center" style="height: 100%">
<img :src="require('./Icons/logo.svg')" style="height: auto;width:210px"/>
</div>
</el-col>
<el-col :span="22">
<div class="flex-vertical-center" style="font-size: 17px;display: flex;height: 100%;color: white; justify-content: flex-end">
<span style="margin: 0 20px">{{ currentTime }}</span>
<span>{{ getWeek() }}</span>
</div>
</el-col>
</el-row>
</el-header>
<el-main style="padding: 0">
<el-container>
<el-aside style="background: #001529" width="190px">
<a-menu mode="inline" theme="dark" v-model:selectedKeys="selectedKeys" @click="onClick">
<a-menu-item :key="'/Main/DataRerun'">
<div class="flex-vertical-center">
<img :src="require('./Icons/1.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">数据重跑</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/DataRepair'">
<div class="flex-vertical-center">
<img :src="require('./Icons/2.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">数据修补</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/FeatureReExtract'">
<div class="flex-vertical-center">
<img :src="require('./Icons/3.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">特征重提</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/FeatureLibraryRebuild'">
<div class="flex-vertical-center">
<img :src="require('./Icons/4.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">特征库重建</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/PeopleReContrast'">
<div class="flex-vertical-center">
<img :src="require('./Icons/5.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">人员重新比对</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/SnapshotCluster'">
<div class="flex-vertical-center">
<img :src="require('./Icons/6.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">抓拍聚类</span>
</div>
</a-menu-item>
<a-menu-item :key="'/Main/EquipmentTimeErrorVerification'">
<div class="flex-vertical-center">
<img :src="require('./Icons/7.svg')" style="height: auto;width:20px"/>
<span style="padding: 0 5px">设备时间错误校验</span>
</div>
</a-menu-item>
</a-menu>
</el-aside>
<el-main>
<router-view :key="$route.fullPath"></router-view>
</el-main>
</el-container>
</el-main>
</el-container>
</template>
<script>
import {defineComponent, getCurrentInstance, ref} from 'vue'
import {useRouter} from 'vue-router'
import moment from "moment"
export default defineComponent({
setup() {
const {proxy} = getCurrentInstance()
const selectedKeys = ref([proxy.$root.$route.path])
const router = useRouter()
const currentTime = ref(moment().format("YYYY-MM-DD HH:mm:ss"))
const goto = function(path) {
router.push(path)
}
const getOpeneds = function() {
let result = []
for (let i = 0; i < 1000; i++)
{
result.push(i)
}
return result
}
const onClick = function({key}) {
router.push(
`${key}`
)
}
const getWeek = function(date) {
let week = moment(date).day()
switch (week)
{
case 1:
return '星期一'
case 2:
return '星期二'
case 3:
return '星期三'
case 4:
return '星期四'
case 5:
return '星期五'
case 6:
return '星期六'
case 0:
return '星期天'
}
}
const __main = function() {
setInterval(() => {
currentTime.value = moment().format("YYYY-MM-DD HH:mm:ss")
}, 1000)
}
__main()
return {
// scalar
currentTime,
selectedKeys,
// sequence
// mapping
// function
goto,
getOpeneds,
onClick,
getWeek,
}
},
})
</script>
<style>
</style>