马宇豪
2025-03-04 1b9fea7d4af68d8f933b2dc42bf6084b9646f64c
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
<template>
  <div id="pageCont" class="dark-page">
    <div class="btns">
      <dv-decoration-11 :color="lineColor" @click="goBack()">
        <div color-green font-600 bg="~ dark/0">
          返回
        </div>
      </dv-decoration-11>
    </div>
    <dv-decoration7 :color="lineColor" style="width:100%;height:6%;margin-bottom: 20px">
      <div class="msgTit">
        {{title}}
      </div>
    </dv-decoration7>
    <dv-border-box1 :color="lineColor" style="width: 100%;height: calc(100% - 20px)">
 
    </dv-border-box1>
  </div>
</template>
 
<script lang="ts">
  import screenfull from 'screenfull';
  import { toRefs, reactive, ref, onMounted, defineComponent, defineAsyncComponent, nextTick, onUnmounted } from 'vue';
  import { ElTable } from 'element-plus';
  import { FormInstance, FormRules, ElMessage } from 'element-plus';
  import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent/index.ts';
  import { useRoute } from 'vue-router';
  import {hiddenReportApi} from "/@/api/doublePreventSystem/report";
  import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice/index.ts';
  import '/@/theme/bigScreen.css'
  import {useScreenTheme} from "/@/stores/screenTheme"
  import {storeToRefs} from "pinia";
 
  // 定义接口来定义对象的类型
  interface stateType {
    lineColor: Array<string>,
    title: string | null
  }
  export default defineComponent({
    name: 'msgDetail',
    components: {
 
    },
    setup() {
      const screenThemes = useScreenTheme()
      const { screenTheme } = storeToRefs(screenThemes);
      const route = useRoute();
      const state = reactive<stateType>({
        lineColor: ['#11FEEE'],
        title: ''
      });
 
      // 页面载入时执行方法
      onMounted(() => {
        if (route.query.row) {
          state.title = route.query.row[1]
        }
        getTheme()
      });
 
 
 
      const getTheme =()=>{
        if(screenTheme.value.isDark){
          window.document.getElementById('pageCont').setAttribute( "class", 'dark-page' );
          state.lineColor = ['#11FEEE']
        }else{
          window.document.getElementById('pageCont').setAttribute( "class", 'light-page' );
          state.lineColor = ['#333','#ccc']
        }
      }
 
      // 返回上一页
      const goBack = () => {
        window.history.go(-1);
      };
 
 
      return {
        route,
        goBack,
        ...toRefs(state)
      };
    }
  });
</script>
 
<style scoped lang="scss">
  .dark-page{
    width: 100%;
    height: 100%;
    border:1px #5a5959 solid;
    background: url('../../../../assets/warningScreen/body-bg.jpg');
    padding: 1.25rem 4% 4%;
    .btns{
      position: fixed;
      width: 8%;
      height: 6%;
      right: 5%;
      top: 1.25rem;
      display: flex;
      align-items: center;
      font-size: 1.125rem;
      color: rgb(17, 254, 238);
      cursor: pointer;
    }
    .msgTit{
      font-size: 2rem;
      color: rgb(17, 254, 238);
      margin: 0 4rem;
    }
  }
  .light-page{
    width: 100%;
    height: 100%;
    border:1px #5a5959 solid;
    background: #F0F0F0;
    padding: 1.25rem 4% 4%;
    .btns{
      position: fixed;
      width: 8%;
      height: 6%;
      right: 5%;
      top: 1.25rem;
      display: flex;
      align-items: center;
      font-size: 1.125rem;
      color: #333;
      cursor: pointer;
    }
    .msgTit{
      font-size: 2rem;
      color: #333;
      margin: 0 4rem;
    }
  }
</style>