| | |
| | | <div>其他</div> |
| | | </div> |
| | | </div> |
| | | <div class="contentBox"> |
| | | <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" |
| | |
| | | class="gradchild" |
| | | v-for="(citem, cindex) in item.list" |
| | | :style="{ background: citem.color }" |
| | | @mouseover="showDetail(index, cindex, 1)" |
| | | @mouseout="closeDetail(index, cindex, 0)" |
| | | @click.self="showDetail(index, cindex, 1, $event)" |
| | | :key="cindex" |
| | | > |
| | | <div class="detailDialog" v-if="citem.showDetail"> |
| | | <!-- <div class="dialogContent" @click="gotoDetail(citem)"> --> |
| | | <div |
| | | class="detailDialog" |
| | | :style="popupStyle" |
| | | v-if="citem.showChildDetail" |
| | | > |
| | | <div |
| | | class="closeBtn" |
| | | @click.stop="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> |
| | | </div> |
| | | <div></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from "moment"; |
| | | import floatingWindow from "./floatingWindow.vue"; |
| | | import yearWindow from "./yearWindow.vue"; |
| | | import { nextTick } from "vue"; |
| | | import fileApi from "@/assets/js/middleGround/api/file"; |
| | | import { requestCtx, appRefCode } from "@/assets/js/config"; |
| | | 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", |
| | | }, |
| | | popupStyle: { |
| | | left: "0", |
| | | top: "0", |
| | | }, |
| | | }; |
| | | }, |
| | | |
| | | methods: { |
| | | gotoDetail(item) {}, |
| | | mounted() { |
| | | this.getListData(); |
| | | }, |
| | | |
| | | 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); |
| | | // } |
| | | // } |
| | | |
| | | }, |
| | | showDetail(index, cindex, type) { |
| | | methods: { |
| | | showYearWindow(item, event) { |
| | | console.log(item, "item"); |
| | | 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); |
| | | 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) => { |
| | | console.log(res, "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); |
| | | for (let j = 0; j < listData.length; j++) { |
| | | const element = listData[j]; |
| | | this.$set(element, "showChildDetail", false); |
| | | } |
| | | console.log(item, "item"); |
| | | } |
| | | } |
| | | |
| | | this.contentList = res.datas; |
| | | 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 = await this.getResourcePath(item.file); |
| | | console.log(requestCtx, "requestCtx"); |
| | | this.$set(item, "fileLink", requestCtx); |
| | | } |
| | | this.$set(item, "showDetail", false); |
| | | this.$set(item, "color", this.colorList[item.cmsItemType]); |
| | | } |
| | | } |
| | | |
| | | if (this.contentList[index].list[cindex].type) { |
| | | this.contentList[index].list[cindex].showDetail = true; |
| | | if (filterList.length > 0) { |
| | | console.log(filterList, "filterList"); |
| | | } |
| | | return filterList; |
| | | }, |
| | | |
| | | // 获取阿里云加速地址 (视频,音频) |
| | | async getResourcePath(md5) { |
| | | try { |
| | | // 如果返回的数据为空或未定义,则拼接默认下载路径 |
| | | return requestCtx + "/file/api/ApiDownload?md5=" + md5; |
| | | } catch (error) { |
| | | // 捕获异常并打印错误日志 |
| | | console.error("获取资源路径失败:", error); |
| | | // 返回一个默认值或抛出错误(根据业务需求) |
| | | return requestCtx + "/file/api/ApiDownload?md5=" + md5; |
| | | } |
| | | }, |
| | | |
| | | closeDetail(index, cindex, type) { |
| | | for (let i = 0; i < this.contentList.length; i++) { |
| | | const item = this.contentList[i]; |
| | | if (item && item.list?.length > 0) { |
| | | for (let j = 0; j < item.list.length; j++) { |
| | | const citem = item.list[j]; |
| | | this.$set(citem, "showChildDetail", false); |
| | | } |
| | | } |
| | | } |
| | | 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(); |
| | | const screenWidth = window.innerWidth; |
| | | const popupWidth = 542; // 假设弹框宽度为200px |
| | | // 判断触发元素位置 |
| | | if (rect.left + rect.width / 2 < screenWidth / 2) { |
| | | // 左侧显示弹框在右侧 |
| | | this.popupStyle = { |
| | | left: `${rect.right}px`, |
| | | top: `${rect.bottom - 150}px`, |
| | | }; |
| | | } else { |
| | | this.contentList[index].list[cindex].showDetail = false; |
| | | // 右侧显示弹框在左侧 |
| | | this.popupStyle = { |
| | | left: `${rect.left - popupWidth}px`, |
| | | top: `${rect.bottom - 150}px`, |
| | | }; |
| | | } |
| | | console.log(this.popupStyle.top, "this.top"); |
| | | console.log(this.popupStyle.left, "this.left"); |
| | | // if (rect.left - popupWidth < 0) { |
| | | // // 左侧空间不足时强制右侧显示 |
| | | // this.popupStyle.left = `${rect.right}px`; |
| | | // } else if (rect.right + popupWidth > screenWidth) { |
| | | // // 右侧空间不足时强制左侧显示 |
| | | // this.popupStyle.left = `${rect.left - popupWidth}px`; |
| | | // } |
| | | for (let i = 0; i < this.contentList.length; i++) { |
| | | const item = this.contentList[i]; |
| | | if (item && item.list?.length > 0) { |
| | | for (let j = 0; j < item.list.length; j++) { |
| | | const citem = item.list[j]; |
| | | if (citem.showChildDetail) { |
| | | this.contentList[i].list[j].showDetail = false; |
| | | citem.showChildDetail = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (this.contentList[index].list[cindex].type) { |
| | | this.contentList[index].list[cindex].showChildDetail = true; |
| | | } |
| | | }, |
| | | }, |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: auto; |
| | | font-family: Source Han Sans; |
| | | } |
| | | |
| | | .pageBox { |
| | |
| | | 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; |
| | |
| | | // } |
| | | /* 对于WebKit浏览器和Blink引擎(如Chrome, Opera) */ |
| | | ::-webkit-scrollbar { |
| | | width: 16px; /* 滚动条的宽度 */ |
| | | width: 4px; /* 滚动条的宽度 */ |
| | | height: 16px; /* 滚动条的高度 */ |
| | | } |
| | | |
| | |
| | | |
| | | ::-webkit-scrollbar-thumb { |
| | | background: #b9a587; /* 滚动条滑块的颜色 */ |
| | | border-radius: 16px; /* 滚动条滑块的圆角 */ |
| | | border-radius: 2px; /* 滚动条滑块的圆角 */ |
| | | width: 4px; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-thumb:hover { |
| | |
| | | .chartsItem { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | } |
| | | |
| | | .item-grad { |
| | |
| | | position: relative; |
| | | } |
| | | |
| | | // .gradchild :hover { |
| | | // transform: scale(1.1); |
| | | // z-index: 999; |
| | | // } |
| | | |
| | | /* 重置子元素的样式 */ |
| | | // .gradchild:hover .detailDialog { |
| | | // transform: scale(1); |
| | | // z-index: 999; |
| | | // } |
| | | .item-circle :hover ::before { |
| | | background-color: #b9a587 !important; |
| | | } |
| | | .item-circle { |
| | | width: 100%; |
| | | height: 20px; |
| | |
| | | align-items: center; |
| | | } |
| | | .detailDialog { |
| | | position: absolute; |
| | | // left: -54px; |
| | | // bottom: 50px; |
| | | top: -550%; |
| | | width: 400px; |
| | | position: fixed; |
| | | width: 524px; |
| | | z-index: 9999; |
| | | cursor: pointer; |
| | | background: #fff; |
| | | 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; |
| | | 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: 5px; |
| | | // z-index: 20; |
| | | // box-sizing: border-box; |
| | | // } |
| | | .closeBtn { |
| | | position: absolute; |
| | | width: 20px; |
| | | height: 20px; |
| | | top: 10px; |
| | | right: 5px; |
| | | z-index: 999; |
| | | } |
| | | |
| | | .detailDialog .dialogContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: #fff; |
| | | position: relative; |
| | | padding: 15px; |
| | | z-index: 20; |
| | | box-sizing: border-box; |
| | | ::v-deep .el-loading-spinner { |
| | | .el-loading-text { |
| | | font-size: 14px; |
| | | color: #937950; |
| | | } |
| | | |
| | | .el-icon-loading { |
| | | font-size: 14px; |
| | | color: #937950; |
| | | } |
| | | } |
| | | </style> |