杨磊
3 天以前 a5abb70a428f59894fc9ee4330f0033d6fe93a8b
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
<template>
  <div class="dialogBox">
    <div
      class="journalBox"
      v-if="info.cmsItemType === 'journal' || info.cmsItemType === 'books'"
    >
      <div class="title">{{ info.name }}</div>
      <div class="subtitle">
        <div class="source">{{ info.source }}</div>
        <div class="journalInformation">{{ info.IssueNumber }}</div>
      </div>
      <div class="contentBox">
        <span>{{ info.author }}</span>
        <span style="margin-left: 20px"> {{ info.authorsUnits }}</span>
        <span></span>
      </div>
      <div class="abstract">
        摘要:
        <span v-html="info.abstract"></span>
      </div>
      <div class="keyword">
        关键词: <span>{{ info.keyWords }}</span>
      </div>
    </div>
    <div class="imageBox" v-if="info.cmsItemType === 'image'">
      <div style="width: 350px; height: 200px; position: relative">
        <img
          class="autoImg"
          src="@/assets/images/chronology/photoTest.png"
          alt=""
        />
      </div>
      <div
        style="
          display: flex;
          width: 100%;
          justify-content: space-between;
          margin-top: 50px;
        "
      >
        <div class="ARROWS">←</div>
        <div class="ARROWS">→</div>
      </div>
    </div>
    <div class="videoBox" v-if="info.cmsItemType === 'video'">
      <video width="370" height="200" controls :src="info.requestCtx"></video>
 
      <div>
        <div class="subtitle">
          <div class="source">{{ info.source }}</div>
          <div class="journalInformation">2005 3月 第40卷 第4期</div>
        </div>
        <div class="contentBox" style="text-align: left">
          <div class="contentBox" style="text-align: left">
          <div class="audioContent" v-html="info.abstract"></div>
        </div></div>
      </div>
    </div>
    <div class="audioBox" v-if="info.cmsItemType === 'audio'">
      <div style="text-align: center">
        <audio
          style="width: 90%"
          src="https://www.w3schools.com/html/horse.ogg"
          controls
        ></audio>
      </div>
      <div>
        <div class="subtitle">
          <div class="source">{{ info.source }}</div>
          <div class="journalInformation">2005 3月 第40卷 第4期</div>
        </div>
        <div class="contentBox" style="text-align: left">
          <div class="audioContent" v-html="info.abstract"></div>
        </div>
      </div>
    </div>
 
    <div class="btnBox">
      <div class="detailBtn">查看详情</div>
    </div>
  </div>
</template>
 
<script>
export default {
  name: "floatingWindow",
  props: {
    info: {
      type: Object,
      default: () => {},
    },
  },
 
  data() {
    return {};
  },
  mounted() {
    console.log(this.info);
  },
};
</script>
 
<style scoped>
.dialogBox {
  width: 524px;
  height: 100%;
  background-color: #fdf8f0;
  position: relative;
  padding: 15px;
  z-index: 20;
  box-sizing: border-box;
}
.title {
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}
 
.subtitle {
  display: flex;
  justify-content: space-between;
}
.subtitle {
  margin-top: 20px;
}
.abstract {
  margin-top: 10px;
  white-space: pre-line;
  line-height: 18px;
}
.keyword {
  margin-top: 10px;
  white-space: pre-line;
  line-height: 18px;
}
.contentBox {
  margin-top: 10px;
  line-height: 18px;
}
.imageBox {
  min-height: 300px;
  padding: 10px;
}
 
.videoBox {
  min-height: 240;
  text-align: center;
}
.videoTitle {
  background: #ffffff;
  box-sizing: border-box;
  border: 1px solid #dcdcdc;
  box-shadow: 0px 0px 10px 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  padding: 10px;
  width: 100%;
  height: 100%;
}
.autoImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ARROWS {
  font-size: 24px;
  line-height: 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #8f7a5a;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  color: #8f7a5a;
}
.source {
  max-width: 300px;
  overflow: hidden;
  white-space: normal;
}
.btnBox {
  text-align: center;
  margin-top: 20px;
  display: flex;
  justify-content: center;
}
.detailBtn {
  width: 100px;
  height: 30px;
  border-radius: 30px;
  color: #8f7a5a;
  line-height: 30px;
  cursor: pointer;
  border: 1px solid #8f7a5a;
}
.audioContent{
  white-space: pre-line;
  line-height: 18px;
  margin-top: 10px;
  max-height: 100px;
  overflow-y: auto;
  margin-top: 20px;
}
</style>