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
| <!--点击站点 跳转至风险模型页面 -->
| <script>
| import SubFlightInspection from '@/views/exception/components/SubFlightInspection.vue'
| export default {
| components: {
| SubFlightInspection
| },
| data() {
| return {
| siteName: '',
| month: '',
| // 页标题
| title:''
| }
| },
| watch: {},
| mounted() {},
| beforeRouteEnter(to, from, next) {
| next((vm) => {
| // 通过 `vm` 访问组件实例
| vm.siteName = to.params.siteName
| vm.month = to.params.month
| vm.$nextTick(() => {
| // console.log('midd11', vm.siteName, vm.month);
| })
| })
| },
| methods: {
| // 回退页面
| onBack() {
| this.$router.back()
| }
| }
| }
| </script>
|
| <template>
| <el-page-header @back="onBack">
| <template #content>
| <span> 异常详情 </span>
| </template>
| </el-page-header>
|
| <SubFlightInspection :site-name="siteName" :month="month"> </SubFlightInspection>
| </template>
|
| <style scoped>
| .el-page-header {
| margin: 10px 0px 10px 10px;
| }
| span {
| font-size: 14px;
| color: #333333;
| }
| </style>
|
|