From a460a8094e5e1f3954185b25df0361c3b2d3d948 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期一, 28 四月 2025 16:35:22 +0800 Subject: [PATCH] 高级检索 --- src/views/chronology/index.vue | 43 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue index e202f0f..4f981b1 100644 --- a/src/views/chronology/index.vue +++ b/src/views/chronology/index.vue @@ -96,7 +96,8 @@ 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, @@ -158,6 +159,7 @@ }, }) .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); @@ -172,7 +174,6 @@ } } - console.log(this.contentList, "this.contentList"); this.contentList = res.datas; this.showList = true; }); @@ -205,13 +206,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 = - this.config.requestCtx + `/file/api/ApiDownload?md5=${item.file}`; + const requestCtx = await this.getResourcePath(item.file); + console.log(requestCtx, "requestCtx"); this.$set(item, "fileLink", requestCtx); } this.$set(item, "showDetail", false); @@ -224,6 +224,20 @@ } 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]; @@ -297,6 +311,7 @@ display: flex; flex-direction: column; overflow: auto; + font-family: Source Han Sans; } .pageBox { @@ -450,6 +465,7 @@ margin-left: -9px; z-index: 99; background: #fff; + cursor: pointer; } .item-text { @@ -469,7 +485,11 @@ 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; @@ -498,7 +518,16 @@ right: 5px; z-index: 999; } + ::v-deep .el-loading-spinner { - color: #937950 !important; + .el-loading-text { + font-size: 14px; + color: #937950; + } + + .el-icon-loading { + font-size: 14px; + color: #937950; + } } </style> -- Gitblit v1.9.1