拖旺项目:聊城公交辅助决策系统
master
2022-04-27 493930a42a2ea3e13905ffd8772cdb945baa7bcf
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<template>
  <div
    class="
      page-container page-safety-report-detail page-safety-dispatch-report
      colorfff
    "
  >
    <div class="nav">
      <img
        class="nav-icon"
        :src="require('@/assets/safety/location.png')"
        alt=""
      />
      <div class="nav-content">
        <span>安全管理 </span>
        <i class="el-icon el-icon-arrow-right"></i>
        <span> 内容详情</span>
      </div>
    </div>
    <div class="content">
      <div class="detail-wrap">
        <div class="title">
          <span class="title-text">内容详情</span>
        </div>
 
        <div class="table">
          <div class="row">
            <div class="flex">
              <div class="label"><span>创建时间</span>:</div>
              <div class="value">{{ detail.createDate }}</div>
            </div>
            <div class="flex">
              <div class="label"><span>标题</span>:</div>
              <div class="value">{{ detail.title }}</div>
            </div>
            <div class="flex">
              <div class="label"><span>信息类型</span>:</div>
              <div class="value">{{typeMap[detail.type]}}</div>
            </div>
          </div>
          <div class="row flex" style="width: 100%">
            <div class="label"><span>内容详情</span>:</div>
            <div class="value flex" style="padding-right: 30px; width: 85%">
              <div style="margin-top: 1em" v-html="detail.publishContent"></div>
            </div>
          </div>
          <div class="row flex" style="width: 100%" v-if="detail.fileList">
            <div class="label"><span>附件内容</span>:</div>
            <div class="value flex" style="padding-right: 30px; width: 85%">
              <div style="margin-right: 10px; cursor: pointer" v-for="item in detail.fileList" @click="downloadFile(item)">{{item.fileName}}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
import qs from 'qs'
export default {
  name: "accidentReportDetail",
  data() {
    return {
      id: "",
      detail: {
 
      },
      typeMap: {
        "1": '服务月报',
        "2": '安全月报',
        "3": '安全学习',
        "4": '规章制度',
        "5": '公告通知',
        "6": '疫情防控'
      },
    };
  },
  created() {
 
  },
  activated() {
    this.getArtDetail();
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    },
    getArtDetail(){
      this.$axios.get(this.$Interface.safetyArticle.detail, {
        params: {id: this.$route.query.id}
      }).then(res => {
        this.detail = res.data;
      })
    },
    downloadFile(item){
      let token = localStorage.getItem("mtoken");
      item.token = token;
      const a = document.createElement('a');
      const url = `${this.$exportBase + 'sys/oss/download'}?${qs.stringify(item)}`
      a.href = url;
      a.click();
    }
  },
};
</script>
 
<style lang="less" scoped>
@import url("../../assets/css/common.css");
@orange: #1cd1d3;
@blue: #3e89d3;
.pointer {
  cursor: pointer;
}
.page-container {
  padding: 20px 30px;
  padding-bottom: 0;
  .nav {
    display: flex;
    font-size: 14px;
    width: 100%;
    height: 20px;
    align-items: center;
    .nav-icon {
      width: 18px;
      margin-left: 11px;
      flex-shrink: 0;
      margin-right: 11px;
    }
    .nav-content {
      flex: 1;
    }
  }
  .content {
    margin-top: 30px;
    .detail-wrap {
      width: 96vw;
      height: calc(100vh - 300px);
      border: 2px solid #415788;
      backdrop-filter: blur(2px);
      margin: auto;
      position: relative;
      .title {
        background: #090f1d;
        padding: 17px 20px;
        .title-text {
          display: block;
          margin-right: 8px;
          width: 120px;
          height: 29px;
          background: #0c1a35;
          border: 1px solid #47598f;
          border-radius: 4px;
          line-height: 29px;
          text-align: center;
        }
      }
      .icon-close {
        position: absolute;
        top: 0;
        right: -3px;
        width: 42px;
        cursor: pointer;
      }
      .row {
        margin: 0 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      }
      .table {
        // margin-top: 23px;
        > .row {
          font-size: 14px;
          display: flex;
          align-items: center;
          padding: 10px 0;
          >div{
            width: 25%;
          }
          .label {
            width: 100px;
            text-align: right;
            padding: 16px 0;
            color: #a3b0d1;
            line-height: 0;
            span {
              display: inline-block;
              width: 60px;
              text-align: right;
            }
          }
          .value {
            padding-left: 24px;
          }
          .row {
            width: 435px;
            border-bottom: 0;
            margin-right: 30px;
            flex-shrink: 0;
          }
        }
      }
      .action-bar {
        display: flex;
        justify-content: center;
        align-items: center;
        color: #fff;
        font-size: 14px;
        margin-top: 313px;
        .action-item:first-child {
          margin-right: 96px;
        }
        .action-item {
          padding: 8px 30px;
          border-left: 2px solid;
          border-right: 2px solid;
          opacity: 0.8;
        }
        .orange {
          border-color: @orange;
          background-color: rgba(28, 209, 211, 0.1);
        }
        .blue {
          border-color: @blue;
          background-color: rgba(62, 137, 211, 0.1);
        }
      }
    }
  }
  .flex{
    display: flex;
    align-items: center;
  }
}
</style>