From 3eba8102f54dba44758865df0cccf4aae8aea2da Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期一, 21 四月 2025 18:28:25 +0800 Subject: [PATCH] 年谱接口 --- src/views/chronology/floatingWindow.vue | 49 +- src/views/chronology/yearWindow.vue | 81 ++++ src/views/chronology/index.vue | 915 ++++++++----------------------------------------- 3 files changed, 267 insertions(+), 778 deletions(-) diff --git a/src/views/chronology/floatingWindow.vue b/src/views/chronology/floatingWindow.vue index 88fd7b5..1d79eec 100644 --- a/src/views/chronology/floatingWindow.vue +++ b/src/views/chronology/floatingWindow.vue @@ -2,30 +2,27 @@ <div class="dialogBox"> <div class="journalBox" - v-if="info.type === 'journal' || info.type === 'book'" + v-if="info.cmsItemType === 'journal' || info.cmsItemType === 'books'" > - <div class="title">澶嶆柟鍓傞噺閰嶆瘮澶氱洰鏍囦紭鍖栫殑ED-NM-MO涓夎仈娉�</div> + <div class="title">{{ info.name }}</div> <div class="subtitle"> - <div class="source">涓浗涓尰鍩虹鍖诲鏉傚織</div> - <div class="journalInformation">2005 3鏈� 绗�40鍗� 绗�4鏈�</div> + <div class="source">{{ info.source }}</div> + <div class="journalInformation">{{ info.IssueNumber }}</div> </div> <div class="contentBox"> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> + <span>{{ info.author }}</span> + <span style="margin-left: 20px"> {{ info.authorsUnits }}</span> + <span></span> </div> <div class="abstract"> 鎽樿锛� - 閽堝澶嶆柟澶氳嵂鐗�(澶氶儴浣嶅缁勫垎澶氭垚鍒�)銆佸闈剁偣澶氳嵂鏁堟寚鏍囥�侀潪绾挎�х殑鐗瑰緛,鎻愬嚭澶嶆柟鍓傞噺閰嶆瘮浼樺寲鐨凟D-NM-MO涓夎仈娉�,璇ユ柟娉曞叿鏈夎壇濂界殑闈炵嚎鎬ф嫙鍚堣兘鍔�,鍙互閫傚簲澶嶆柟鐨勯潪绾挎�х壒寰�,鍙堝彲浠ュ疄鐜板悓鏃堕拡瀵瑰涓嵂鏁堟寚鏍囩殑澶氱洰鏍囦紭鍖�,閫傚悎澶嶆柟鐨勫闈剁偣鐗瑰緛,鏄竴绉嶉�傚簲澶嶆柟鐗圭偣鐨勪紭鍖栨柟娉曘�� + <span v-html="info.abstract"></span> </div> <div class="keyword"> - 鍏抽敭璇嶏細 澶嶆柟鍓傞噺閰嶆瘮浼樺寲; 澶嶆柟鏁板鐗瑰緛; 澶氳嵂鏁堟寚鏍�; 闈炵嚎鎬�; - 璇曢獙璁捐-闈炵嚎鎬у缓妯�-澶氱洰鏍囦紭鍖栫殑涓夎仈娉� + 鍏抽敭璇嶏細 <span>{{ info.keyWords }}</span> </div> </div> - <div class="imageBox" v-if="info.type === 'image'"> + <div class="imageBox" v-if="info.cmsItemType === 'image'"> <div style="width: 350px; height: 200px; position: relative"> <img class="autoImg" @@ -45,32 +42,31 @@ <div class="ARROWS">鈫�</div> </div> </div> - <div class="BookBox" v-if="info.type === 'book'">book</div> - <div class="videoBox" v-if="info.type === 'video'"> + <div class="videoBox" v-if="info.cmsItemType === 'video'"> <video width="370" height="240" controls - src="https://www.w3schools.com/html/mov_bbb.mp4" + :src="info.requestCtx" ></video> <div> <div class="subtitle"> - <div class="source">涓浗涓尰鍩虹鍖诲鏉傚織</div> + <div class="source">{{ info.name }}</div> <div class="journalInformation">2005 3鏈� 绗�40鍗� 绗�4鏈�</div> </div> <div class="contentBox" style="text-align: left"> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> - <p>鐜嬬澘 涓浗绉戝闄㈠ぇ杩炲寲瀛︾墿鐞嗙爺绌舵墍</p> + </div> </div> </div> - <div class="audioBox" v-if="info.type === 'audio'"> + <div class="audioBox" v-if="info.cmsItemType === 'audio'"> <div style="text-align: center"> - <audio style="width: 100%" src="https://www.w3schools.com/html/horse.ogg" controls></audio> + <audio + style="width: 100%" + src="https://www.w3schools.com/html/horse.ogg" + controls + ></audio> </div> <div> <div class="subtitle"> @@ -179,4 +175,9 @@ font-weight: 700; color: #8f7a5a; } +.source{ + max-width: 300px; + overflow: hidden; + white-space: normal; +} </style> diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue index b2f7689..f60bbfb 100644 --- a/src/views/chronology/index.vue +++ b/src/views/chronology/index.vue @@ -31,7 +31,7 @@ </div> </div> <div class="contentBox"> - <div class="chartsBox"> + <div class="chartsBox" v-if="showList"> <div class="chartsItemBox" v-for="(item, index) in contentList" @@ -44,24 +44,36 @@ v-for="(citem, cindex) in item.list" :style="{ background: citem.color }" @mouseover="showDetail(index, cindex, 1)" - @mouseout="closeDetail(index, cindex, 0)" :key="cindex" > <div class="detailDialog" v-if="citem.showDetail"> <!-- <div class="dialogContent" @click="gotoDetail(citem)"> --> + <div + class="closeBtn" + @click="closeDetail(index, cindex, 0)" + > + <i class="el-icon-close"></i> + </div> <floatingWindow :info="citem" /> <!-- </div> --> </div> </div> </div> - <div class="item-circle"></div> + <div class="item-circle" @click="showYearWindow(index, 1)"></div> + <div class="item-text"> <div class=""> - {{ item.year }} + {{ item.name.split("锛�")[0] }} </div> <div style="margin-top: 10px"> - {{ item.name }} + {{ item.age }} </div> + </div> + <div class="yaerWindow" v-if="item.showDetail"> + <div class="closeBtn" @click="closeYearWindow(index, 0)"> + <i class="el-icon-close"></i> + </div> + <yearWindow :info="item" /> </div> </div> </div> @@ -72,772 +84,147 @@ </template> <script> +import moment from "moment"; import floatingWindow from "./floatingWindow.vue"; +import yearWindow from "./yearWindow.vue"; + export default { components: { floatingWindow, + yearWindow, }, data() { return { - contentList: [ - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1938", - type: "journal", - id: "1", - }, - ], - name: "鍑虹敓", - year: "1938", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - type: "image", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - type: "book", - id: "2", - }, - ], - name: "涓�宀�", - year: "1939", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "2", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - type: "video", - id: "3", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - type: "audio", - id: "4", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - id: "5", - }, - ], - name: "3宀�", - year: "1941", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#6F8F5A", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "2", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - id: "3", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - id: "4", - }, - { - color: "#B9A587", - showDetail: false, - name: "鐜嬫案鐐�", - id: "5", - }, - ], - name: "4宀�", - year: "1941", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - { - list: [ - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#87A7B9", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - { - color: "#CB9D9D", - showDetail: false, - name: "鐜嬫案鐐�", - year: "1937", - id: "1", - }, - ], - name: "5宀�", - year: "1942", - }, - ], + contentList: [], + currentYear: null, + showList: false, + colorList: { + journal: "#87a7b9", + books: "#c48787", + video: "#6f8f5a", + audio: "#b9a587", + newspaper: "#8d77b3", + other: "#009f9f", + }, }; }, - methods: { - gotoDetail(item) {}, + mounted() { + this.getListData(); + }, + methods: { + showYearWindow(item) { + console.log(item, "item"); + for (let i = 0; i < this.contentList.length; i++) { + const item = this.contentList[i]; + this.$set(item, "showDetail", false); + } + this.contentList[item].showDetail = true; + }, + closeYearWindow(item) { + for (let i = 0; i < this.contentList.length; i++) { + const item = this.contentList[i]; + this.$set(item, "showDetail", false); + } + }, + gotoDetail(item) {}, + getListData() { + this.MG.resource + .getItem({ + path: "WYY_chronology", + fields: { + year: [], + age: [], + eventOverview: [], + eventPictures: [], + }, + paging: { + start: 0, + size: 999, + }, + }) + .then(async (res) => { + for (let i = 0; i < res.datas.length; i++) { + const item = res.datas[i]; + this.$set(item, "showDetail", false); + const listData = await this.getYearResource(item); + if (listData.length > 0) { + this.$set(item, "list", listData); + console.log(item, "item"); + } + } + + console.log(this.contentList, "this.contentList"); + this.contentList = res.datas.reverse(); + this.showList = true; + }); + }, + + async getYearResource(item) { + const endDate = item.year.split("/")[0] + "/12/31 23:59:59"; + const startDate = item.year.split("/")[0] + "/01/01 00:00:00"; + const yearDataList = await this.MG.resource.getItem({ + path: "*", + queryType: "*", + fields: { + "year>=": startDate, + "year<=": endDate, + source: [], + IssueNumber: [], + author: [], + authorsUnits: [], + abstract: [], + keyWords: [], + subjectAffiliation: [], + file: [], + }, + SysType: "CmsItem", + paging: { + start: 0, + size: 999, + }, + }); + const filterList = yearDataList.datas.filter((item) => { + return item.cmsItemType != "chronology" && item.cmsItemType != "AWARD"; + }); + if (filterList && filterList.length > 0) { + for (let i = 0; i < filterList.length; i++) { + const item = filterList[i]; + if (item.file) { + const requestCtx = + this.config.requestCtx + `/file/api/ApiDownload?md5=${item.file}`; + this.$set(item, "fileLink", requestCtx); + console.log(item.fileLink, "item.fileLink"); + } + this.$set(item, "showDetail", false); + this.$set(item, "color", this.colorList[item.cmsItemType]); + } + } + return filterList; + }, closeDetail(index, cindex, type) { - // console.log(cindex, "cindex"); - // for (let i = 0; i < this.contentList.length; i++) { - // const item = this.contentList[i]; - // for (let j = 0; j < item.list.length; j++) { - // const citem = item.list[j]; - // this.$set(citem, "showDetail", false); - // } - // } - + console.log(index, cindex, type); + for (let i = 0; i < this.contentList.length; i++) { + const item = this.contentList[i]; + if (item && item.length > 0) { + for (let j = 0; j < item.list.length; j++) { + const citem = item.list[j]; + this.$set(citem, "showDetail", false); + } + } + } }, showDetail(index, cindex, type) { for (let i = 0; i < this.contentList.length; i++) { const item = this.contentList[i]; - for (let j = 0; j < item.list.length; j++) { - const citem = item.list[j]; - this.$set(citem, "showDetail", false); + if (item && item.length > 0) { + for (let j = 0; j < item.list.length; j++) { + const citem = item.list[j]; + this.$set(citem, "showDetail", false); + } } } - if (this.contentList[index].list[cindex].type) { this.contentList[index].list[cindex].showDetail = true; } else { @@ -942,6 +329,7 @@ .chartsItem { width: 100%; height: 100%; + position: relative; } .item-grad { @@ -1012,13 +400,32 @@ box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.5); } +.yaerWindow { + position: absolute; + left: -54px; + bottom: 50px; + width: 700px; + z-index: 9999; + cursor: pointer; + background: #fff; + border: 2px solid #cbbeaa; + box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.5); +} .detailDialog .dialogContent { width: 100%; height: 100%; background-color: #fff; position: relative; - padding: 15px; + padding: 5px; z-index: 20; box-sizing: border-box; } +.closeBtn { + position: absolute; + width: 20px; + height: 20px; + top: 10px; + right: 5px; + z-index: 999; +} </style> diff --git a/src/views/chronology/yearWindow.vue b/src/views/chronology/yearWindow.vue new file mode 100644 index 0000000..a04521e --- /dev/null +++ b/src/views/chronology/yearWindow.vue @@ -0,0 +1,81 @@ +<template> + <div class="dialogBox"> + <div class="title">{{ title }}</div> + <div class="content"> + <div class="leftTxt" v-html="info.eventOverview"></div> + <div class="rightimg"> + <div v-if="imgLink != ''" class="imgBox"> + <img class="autoImg" :src="imgLink" alt="" /> + </div> + <div v-else>鏆傛棤鍥剧墖</div> + </div> + </div> + </div> +</template> + +<script> +import { getPublicImage } from "@/assets/js/middleGround/tool"; + +export default { + name: "floatingWindow", + props: { + info: { + type: Object, + default: () => {}, + }, + }, + data() { + return { + title: "", + imgLink: "", + }; + }, + methods: {}, + mounted() { + console.log(this.info); + this.title = + this.info.name.split("锛�")[0] + " " + this.info.name.split("锛�")[1]; + this.imgLink = getPublicImage(this.info.eventPictures); + console.log(this.imgLink); + }, +}; +</script> + +<style scoped> +.dialogBox { + width: 700px; + height: 100%; + position: relative; + padding: 15px; + z-index: 20; + box-sizing: border-box; +} +.content { + display: flex; + justify-content: space-between; + align-items: center; +} +.leftTxt { + width: 350px; + height: 100%; + background-color: #fff; + overflow: hidden; + white-space: normal; + overflow-x: auto; +} +.rightimg { + width: 350px; + height: 100%; + background-color: #fff; +} +.title { + font-size: 24px; + font-weight: bold; + margin-bottom: 10px; +} +.imgBox { + width: 340px; + min-height: 300px; + position: relative; +} +</style> -- Gitblit v1.9.1