zhongshujie
61 分钟以前 5e73d562bae941a7658c3c13fdb585461f1a24e4
src/views/chronology/index.vue
@@ -98,6 +98,7 @@
import { nextTick } from "vue";
import fileApi from "@/assets/js/middleGround/api/file";
import { requestCtx, appRefCode } from "@/assets/js/config";
export default {
  components: {
    floatingWindow,
@@ -159,7 +160,6 @@
          },
        })
        .then(async (res) => {
          console.log(res, "res");
          for (let i = 0; i < res.datas.length; i++) {
            const item = res.datas[i];
            this.$set(item, "showDetail", false);
@@ -170,10 +170,8 @@
                const element = listData[j];
                this.$set(element, "showChildDetail", false);
              }
              console.log(item, "item");
            }
          }
          this.contentList = res.datas;
          this.showList = true;
        });
@@ -206,12 +204,12 @@
      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 = await this.getResourcePath(item.file);
            console.log(requestCtx, "requestCtx");
            this.$set(item, "fileLink", requestCtx);
          }
          this.$set(item, "showDetail", false);
@@ -249,11 +247,6 @@
        }
      }
      this.contentList[index].list[cindex].showDetail = false;
      console.log(
        this.contentList[index].list,
        "this.contentList[index].list[cindex]"
      );
    },
    showDetail(index, cindex, type, event) {
      const rect = event.target.getBoundingClientRect();
@@ -282,6 +275,8 @@
      //   // 右侧空间不足时强制左侧显示
      //   this.popupStyle.left = `${rect.left - popupWidth}px`;
      // }
      console.log(event, "event");
      for (let i = 0; i < this.contentList.length; i++) {
        const item = this.contentList[i];
        if (item && item.list?.length > 0) {
@@ -294,9 +289,14 @@
          }
        }
      }
      if (this.contentList[index].list[cindex].type) {
        this.contentList[index].list[cindex].showChildDetail = true;
      }
      console.log(
        this.contentList[index].list,
        "this.contentList[index].list[cindex]"
      );
    },
  },
};
@@ -421,20 +421,20 @@
  cursor: pointer;
  position: relative;
}
// .gradchild :hover {
//   transform: scale(1.1);
//   z-index: 999;
// }
.gradchild:hover {
  // transform: scale(1.1);
  width: 23px;
  height: 23px;
  cursor: pointer;
  position: relative;
}
/* 重置子元素的样式 */
// .gradchild:hover .detailDialog {
//   transform: scale(1);
//   z-index: 999;
// }
.item-circle :hover ::before {
  background-color: #b9a587 !important;
}
.item-circle {
  width: 100%;
  height: 20px;
@@ -467,6 +467,10 @@
  background: #fff;
  cursor: pointer;
}
.item-circle:hover:before {
  background-color: #b9a587;
  border: 1px solid #8f7a5a;
}
.item-text {
  margin-top: 16px;
@@ -485,11 +489,13 @@
  border: 2px solid #cbbeaa;
  box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.5);
}
video {
  border-radius: 10px;
  border: 1px solid #dcdcdc;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
}
.yaerWindow {
  position: absolute;
  left: -54px;