From bb5455da328724ba3b4ccb61da0a71eb5beed016 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期日, 27 四月 2025 18:08:07 +0800 Subject: [PATCH] 样式修改 --- src/views/chronology/index.vue | 67 +++++++++++++++++++++++---------- 1 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue index 9543f12..57d1426 100644 --- a/src/views/chronology/index.vue +++ b/src/views/chronology/index.vue @@ -30,8 +30,14 @@ <div>鍏朵粬</div> </div> </div> - <div class="contentBox"> - <div class="chartsBox" v-if="showList"> + <div + class="contentBox" + element-loading-text="骞磋氨鍔犺浇涓�" + element-loading-spinner="el-icon-loading" + element-loading-background="rgba(0, 0, 0, 0)" + v-loading="!showList" + > + <div class="chartsBox"> <div class="chartsItemBox" v-for="(item, index) in contentList" @@ -43,24 +49,21 @@ class="gradchild" v-for="(citem, cindex) in item.list" :style="{ background: citem.color }" - @mouseover="showDetail(index, cindex, 1)" + @click.stop="showDetail(index, cindex, 1, $event)" :key="cindex" > <div class="detailDialog" v-if="citem.showDetail"> - <!-- <div class="dialogContent" @click="gotoDetail(citem)"> --> <div class="closeBtn" - @click="closeDetail(index, cindex, 0)" + @click.stop="closeDetail(index, cindex, 0)" > <i class="el-icon-close"></i> </div> <floatingWindow :info="citem" /> - <!-- </div> --> </div> </div> </div> <div class="item-circle" @click="showYearWindow(index, 1)"></div> - <div class="item-text"> <div class=""> {{ item.name.split("锛�")[0] }} @@ -78,6 +81,7 @@ </div> </div> </div> + <div></div> </div> </div> </div> @@ -114,7 +118,7 @@ }, methods: { - showYearWindow(item) { + showYearWindow(item, event) { console.log(item, "item"); for (let i = 0; i < this.contentList.length; i++) { const item = this.contentList[i]; @@ -156,7 +160,7 @@ } console.log(this.contentList, "this.contentList"); - this.contentList = res.datas.reverse(); + this.contentList = res.datas; this.showList = true; }); }, @@ -188,6 +192,7 @@ 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]; @@ -195,16 +200,18 @@ 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]); } } + + if (filterList.length > 0) { + console.log(filterList, "filterList"); + } return filterList; }, closeDetail(index, cindex, type) { - console.log(index, cindex, type); for (let i = 0; i < this.contentList.length; i++) { const item = this.contentList[i]; if (item && item.length > 0) { @@ -216,21 +223,23 @@ } this.contentList[index].list[cindex].showDetail = false; }, - showDetail(index, cindex, type) { + showDetail(index, cindex, type, event) { + console.log(event, "event"); 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); + item.showDetail = false; } } } + if (this.contentList[index].list[cindex].type) { this.contentList[index].list[cindex].showDetail = true; - } else { - this.contentList[index].list[cindex].showDetail = false; } + console.log(this.contentList[index].list, "this.contentList[index].list[cindex]"); }, }, }; @@ -274,6 +283,12 @@ display: flex; align-items: end; overflow: auto; + + ::v-deep .el-loading-spinner .el-loading-text { + font-size: 14px; + color: #937950; + } + .chartsBox { white-space: nowrap; padding: 0 80px; @@ -286,7 +301,7 @@ // } /* 瀵逛簬WebKit娴忚鍣ㄥ拰Blink寮曟搸锛堝Chrome, Opera锛� */ ::-webkit-scrollbar { - width: 16px; /* 婊氬姩鏉$殑瀹藉害 */ + width: 4px; /* 婊氬姩鏉$殑瀹藉害 */ height: 16px; /* 婊氬姩鏉$殑楂樺害 */ } @@ -296,7 +311,8 @@ ::-webkit-scrollbar-thumb { background: #b9a587; /* 婊氬姩鏉℃粦鍧楃殑棰滆壊 */ - border-radius: 16px; /* 婊氬姩鏉℃粦鍧楃殑鍦嗚 */ + border-radius: 2px; /* 婊氬姩鏉℃粦鍧楃殑鍦嗚 */ + width: 4px; } ::-webkit-scrollbar-thumb:hover { @@ -348,6 +364,14 @@ position: relative; } +.gradchild:hover { + width: 25px; + height: 25px; + margin-top: 2px; + margin-right: 2px; + cursor: pointer; + position: relative; +} .item-circle { width: 100%; height: 20px; @@ -390,10 +414,10 @@ } .detailDialog { position: absolute; - // left: -54px; - // bottom: 50px; - top: -550%; - width: 400px; + top: -700%; + transform: translateY(20%); + transform: translateX(-50%); + width: 524px; z-index: 9999; cursor: pointer; background: #fff; @@ -429,4 +453,7 @@ right: 5px; z-index: 999; } +::v-deep .el-loading-spinner { + color: #937950 !important; +} </style> -- Gitblit v1.9.1