zhangwencui
14 小时以前 6e1cb1b850f3536eb91b3247f2b5e6aadf6805c9
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<template>
  <view class="danger-investigation-view">
    <PageHeader title="隐患详情"
                @back="goBack" />
    <!-- 内容容器 -->
    <view class="content-container">
      <!-- 隐患信息 -->
      <view class="section">
        <view class="section-title">隐患信息</view>
        <view class="info-item">
          <text class="info-label">隐患编号</text>
          <text class="info-value">{{ form.hiddenCode || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">隐患类型</text>
          <text class="info-value">{{ hidden_danger_type.find(i => String(i.value) === String(form.type))?.label || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">风险等级</text>
          <text class="info-value">{{ form.riskLevel || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">隐患描述</text>
          <text class="info-value">{{ form.hiddenDesc || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">隐患具体位置</text>
          <text class="info-value">{{ form.location || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">上报人</text>
          <text class="info-value">{{ form.createUserName || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">上报时间</text>
          <text class="info-value">{{ form.createTime || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">整改完成期限</text>
          <text class="info-value">{{ form.rectifyTime || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">整改责任人</text>
          <text class="info-value">{{ form.rectifyUserName || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">整改责任人联系方式</text>
          <text class="info-value">{{ form.rectifyUserMobile || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">整改具体措施</text>
          <text class="info-value">{{ form.rectifyMeasures || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">实际整改完成时间</text>
          <text class="info-value">{{ form.rectifyActualTime || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">验收时间</text>
          <text class="info-value">{{ form.verifyTime || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">验收人</text>
          <text class="info-value">{{ form.verifyUserName || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">验收结果</text>
          <text class="info-value">{{ form.verifyResult || '-' }}</text>
        </view>
        <view class="info-item">
          <text class="info-label">验收意见</text>
          <text class="info-value">{{ form.verifyRemark || '-' }}</text>
        </view>
      </view>
    </view>
  </view>
</template>
 
<script setup>
  // 替换 toast 方法
  const showToast = message => {
    uni.showToast({
      title: message,
      icon: "none",
    });
  };
 
  import { ref, onMounted } from "vue";
  import PageHeader from "@/components/PageHeader.vue";
  import useUserStore from "@/store/modules/user";
  import { onLoad } from "@dcloudio/uni-app";
  import { useDict } from "@/utils/dict";
 
  const { hidden_danger_type } = useDict("hidden_danger_type");
  const userStore = useUserStore();
 
  // 表单数据
  const form = ref({
    hiddenCode: "",
    hiddenType: "",
    riskLevel: "",
    hiddenDesc: "",
    location: "",
    createUserName: "",
    createTime: "",
    rectifyTime: "",
    rectifyUserName: "",
    rectifyUserMobile: "",
    rectifyMeasures: "",
    rectifyActualTime: "",
    rectifyResult: "",
    acceptanceTime: "",
    acceptanceOpinion: "",
    verifyResult: "",
  });
 
  // 返回上一页
  const goBack = () => {
    // 返回时清除本地存储的数据
    uni.removeStorageSync("dangerInvestigation");
    uni.navigateBack();
  };
 
  // 初始化页面数据
  const initPageData = () => {
    // 从本地存储获取隐患详情
    const row = uni.getStorageSync("dangerInvestigation");
    if (row) {
      form.value = { ...row };
    } else {
      showToast("暂无隐患数据");
    }
  };
 
  onMounted(() => {
    initPageData();
  });
</script>
 
<style scoped lang="scss">
  @import "@/static/scss/form-common.scss";
  .danger-investigation-view {
    min-height: 100vh;
    background-color: #f8f9fa;
  }
 
  .content-container {
    padding: 16px;
  }
 
  .section {
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
 
  .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #f0f0f0;
  }
 
  .info-item {
    display: flex;
    padding: 14px 16px;
    border-bottom: 1px solid #f8f8f8;
    align-items: flex-start;
  }
 
  .info-item:last-child {
    border-bottom: none;
  }
 
  .info-label {
    font-size: 14px;
    color: #666666;
    min-width: 80px;
    flex-shrink: 0;
    line-height: 22px;
  }
 
  .info-value {
    font-size: 14px;
    color: #333333;
    flex: 1;
    line-height: 22px;
    text-align: right;
  }
 
  .multi-line {
    text-align: left;
    word-break: break-all;
    line-height: 1.6;
  }
 
  .remark-item {
    padding-bottom: 16px;
  }
</style>