杨磊
13 小时以前 6938616d7e67a8822569420f6bddd8754a63d574
Merge branch 'master' of http://182.92.203.7:2001/r/wyyDatabase
4个文件已修改
290 ■■■■■ 已修改文件
src/views/achievements/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/chronology/index.vue 139 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/directory/index.vue 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/honors/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/achievements/index.vue
@@ -668,7 +668,6 @@
    //获取下拉选择框的内容
    async getSelectData() {
      this.loading = true;
      try {
        // 同时发起两个异步请求,并等待它们的结果
        const [subjectListResult, resourceListResult] = await Promise.all([
@@ -718,12 +717,15 @@
    handleSearch(isText) {
      console.log(isText, "isText");
      this.associationList = [];
      console.log(isText, "isText");
      if (isText.text != "") {
        this.inputValue = isText.text;
        this.inputType = isText.type;
        this.associationList.push({
          type: isText.label,
          content: isText.text,
          value: isText.type,
        });
        this.getItemList();
      }
@@ -731,6 +733,7 @@
    // 请求数据
    getItemList() {
      this.loading = true;
      let searchData = {}; // 初始化一个空对象来存储搜索数据
      if (this.inputValue) {
        // 如果输入值存在
@@ -1341,7 +1344,7 @@
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        -webkit-line-clamp: 3;
        span {
          font-family: Source Han Sans;
@@ -1424,6 +1427,9 @@
  border-radius: 5px;
  border: 1px solid #cccccc;
}
:deep.el-pagination.is-background .el-pager li:not(.disabled):hover{
  color: #937950
}
</style>
<style>
src/views/chronology/index.vue
@@ -49,14 +49,10 @@
                  class="gradchild"
                  v-for="(citem, cindex) in item.list"
                  :style="{ background: citem.color }"
                  @click.self="showDetail(index, cindex, 1, $event)"
                  @click.stop="showDetail(index, cindex, 1, $event)"
                  :key="cindex"
                >
                  <div
                    class="detailDialog"
                    :style="popupStyle"
                    v-if="citem.showChildDetail"
                  >
                  <div class="detailDialog" v-if="citem.showDetail">
                    <div
                      class="closeBtn"
                      @click.stop="closeDetail(index, cindex, 0)"
@@ -95,9 +91,7 @@
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,
@@ -115,10 +109,6 @@
        audio: "#b9a587",
        newspaper: "#8d77b3",
        other: "#009f9f",
      },
      popupStyle: {
        left: "0",
        top: "0",
      },
    };
  },
@@ -159,21 +149,17 @@
          },
        })
        .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");
            }
          }
          console.log(this.contentList, "this.contentList");
          this.contentList = res.datas;
          this.showList = true;
        });
@@ -206,12 +192,13 @@
      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");
            const requestCtx =
              this.config.requestCtx + `/file/api/ApiDownload?md5=${item.file}`;
            this.$set(item, "fileLink", requestCtx);
          }
          this.$set(item, "showDetail", false);
@@ -224,79 +211,35 @@
      }
      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) {
        if (item && item.length > 0) {
          for (let j = 0; j < item.list.length; j++) {
            const citem = item.list[j];
            this.$set(citem, "showChildDetail", false);
            this.$set(citem, "showDetail", 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.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`;
      // }
      console.log(event, "event");
      for (let i = 0; i < this.contentList.length; i++) {
        const item = this.contentList[i];
        if (item && item.list?.length > 0) {
        if (item && item.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;
            this.$set(citem, "showDetail", false);
            item.showDetail = false;
            }
          }
        }
      }
      if (this.contentList[index].list[cindex].type) {
        this.contentList[index].list[cindex].showChildDetail = true;
        this.contentList[index].list[cindex].showDetail = true;
      }
      console.log(this.contentList[index].list, "this.contentList[index].list[cindex]");
    },
  },
};
@@ -311,7 +254,6 @@
  display: flex;
  flex-direction: column;
  overflow: auto;
  font-family: Source Han Sans;
}
.pageBox {
@@ -422,18 +364,13 @@
  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;
.gradchild:hover {
  width: 25px;
  height: 25px;
  margin-top: 2px;
  margin-right: 2px;
  cursor: pointer;
  position: relative;
}
.item-circle {
  width: 100%;
@@ -477,7 +414,10 @@
  align-items: center;
}
.detailDialog {
  position: fixed;
  position: absolute;
  top: -700%;
  transform: translateY(20%);
  transform: translateX(-50%);
  width: 524px;
  z-index: 9999;
  cursor: pointer;
@@ -485,11 +425,7 @@
  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;
@@ -501,15 +437,15 @@
  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;
// }
.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;
@@ -530,4 +466,5 @@
    color: #937950;
  }
}
</style>
src/views/directory/index.vue
@@ -7,33 +7,18 @@
    </div>
    <div class="page-main-father">
      <div class="page-main-title">
        <p
          @click="changeTab('chart')"
          :class="[activeTabs == 'chart' ? 'active-tab' : '']"
        >
          <img
            :src="[activeTabs == 'chart' ? chartIcon : noChartIcon]"
            alt=""
          />
        <p @click="changeTab('chart')" :class="[activeTabs == 'chart' ? 'active-tab' : '']">
          <img :src="[activeTabs == 'chart' ? chartIcon : noChartIcon]" alt="" />
          <span>图表显示</span>
        </p>
        <p
          @click="changeTab('list')"
          :class="[activeTabs == 'list' ? 'active-tab' : '']"
        >
        <p @click="changeTab('list')" :class="[activeTabs == 'list' ? 'active-tab' : '']">
          <img :src="[activeTabs == 'list' ? listIcon : noListIcon]" alt="" />
          <span>列表显示</span>
        </p>
      </div>
      <!-- 图表显示 -->
      <div
        class="charts-main"
        v-show="activeTabs == 'chart'"
        v-loading="loading"
        element-loading-text="图表加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(0, 0, 0, 0)"
      >
      <div class="charts-main" v-show="activeTabs == 'chart'" v-loading="loading" element-loading-text="图表加载中"
        element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0)">
        <div class="radial-tree-container" v-show="!loading">
          <div ref="chart" style="width: 100%; height: 70vh"></div>
        </div>
@@ -48,49 +33,36 @@
        </div>
        <transition name="el-fade-in-linear">
          <div class="tooltipBox" v-show="tooltipShow">
            <div
              style="
            <div style="
                padding: 10px;
                background: #fdf8f0;
                border-radius: 5px;
                width: 100%;
                max-height: 500px;
                text-align: center;
              "
            >
              ">
              <div class="closeBtn" @click="tooltipShow = false">
                <i class="el-icon-close"></i>
              </div>
              <div style="display: flex">
                <div
                  style="
                <div style="
                    width: 80px;
                    height: 80px;
                    position: relative;
                    margin-bottom: 10px;
                    background: #d8d8d8;
                  "
                >
                  <img
                    class="autoImg"
                    :src="
                      currentNodeInfo.icon
                  ">
                  <img class="autoImg" :src="currentNodeInfo.icon
                        ? currentNodeInfo.icon
                        : '@/assets/images/directory/touxiang.png'
                    "
                    alt=""
                  />
                    " alt="" />
                </div>
                <div
                  style="padding-top: 20px; text-align: left; margin-left: 20px"
                >
                  <div
                    style="
                <div style="padding-top: 20px; text-align: left; margin-left: 20px">
                  <div style="
                      font-size: 16px;
                      font-weight: bold;
                      margin-bottom: 5px;
                    "
                  >
                    ">
                    {{ currentNodeInfo.name }}
                  </div>
                  <div style="margin-top: 20px">
@@ -111,15 +83,13 @@
                </div>
              </div>
              <div
                style="
              <div style="
                  font-size: 16px;
                  font-weight: bold;
                  margin-bottom: 5px;
                  text-align: left;
                  margin-top: 10px;
                "
              >
                ">
                <p style="margin-bottom: 15px">
                  学习时间:{{ currentNodeInfo.studyTime || "-" }}
                </p>
@@ -134,15 +104,13 @@
                  职称:{{ currentNodeInfo.professionalTitle || "-" }}
                </p>
              </div>
              <div
                style="
              <div style="
                  text-align: left;
                  line-height: 22px;
                  max-height: 200px;
                  overflow-y: auto;
                  padding: 10px;
                "
              >
                ">
                <div v-html="currentNodeInfo.studentProfile"></div>
              </div>
              <!-- <div
@@ -167,17 +135,10 @@
      </div>
      <!-- 列表显示 -->
      <div class="page-main" v-show="activeTabs == 'list'">
        <div
          v-loading="loading"
          style="min-height: 550px"
          element-loading-background="rgba(0, 0, 0, 0)"
          element-loading-text="学生列表加载中"
          element-loading-spinner="el-icon-loading"
        >
        <div v-loading="loading" style="min-height: 550px" element-loading-background="rgba(0, 0, 0, 0)"
          element-loading-text="学生列表加载中" element-loading-spinner="el-icon-loading">
          <div v-for="(item, index) in universityList" :key="index">
            <div
              class="table-title"
              v-if="item.studentList && item.studentList.length > 0">
            <div class="table-title" v-if="item.studentList && item.studentList.length > 0">
              <div class="table-title-left">
                <p class="table-title-name">{{ item.unitName }}</p>
                <p class="table-title-degree">{{ item.academicDegreeName }}</p>
@@ -185,19 +146,13 @@
                  {{ item.studentList.length }}人
                </p>
              </div>
              <div
                class="table-title-right"
                @click="item.isShow = !item.isShow">
              <div class="table-title-right" @click="item.isShow = !item.isShow">
                <img :src="[item.isShow ? topIcon : bottomIcon]" alt="" />
              </div>
            </div>
            <table
              cellpadding="100"
              v-if="
            <table cellpadding="100" v-if="
                item.studentList && item.studentList.length > 0 && item.isShow
              "
              style="vertical-align: middle"
            >
            " style="vertical-align: middle">
              <tr class="table-heading">
                <th>姓名</th>
                <th>性别</th>
@@ -340,33 +295,25 @@
                text-align: center;
              ">
                <div style="width: 80px;height: 80px;position: relative; margin: 0 auto; margin-bottom: 10px;background: #D8D8D8;">
      <img class="autoImg"  src="${
        data.icon
      <img class="autoImg"  src="${data.icon
          ? data.icon
          : require("@/assets/images/directory/touxiang.png")
      }" alt="">
                  </div>
                <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${
                  data.name || "-"
                <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${data.name || "-"
                }</div>
                <div> <span> ${
                  data.gender == "male" ? "男" : "女" || "-"
                } </span> <span> ${data.academicName || "-"} </span> <span> ${
                this.legendList.find((item) => item.value == data.unit)?.name ||
                <div> <span> ${data.gender == "male" ? "男" : "女" || "-"
                } </span> <span> ${data.academicName || "-"} </span> <span> ${this.legendList.find((item) => item.value == data.unit)?.name ||
                "-"
              }  </span></div>
                <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;text-align: left;margin-top: 10px;overflow: hidden;">
                  <p style="margin-bottom: 5px;">学习时间:${
                    data.studyTime || "-"
                  <p style="margin-bottom: 5px;">学习时间:${data.studyTime || "-"
                  }</p>
                  <p style="margin-bottom: 5px; white-space: pre-wrap" >现工作单位:${
                    data.currentEmployer_secondary || "-"
                  <p style="margin-bottom: 5px; white-space: pre-wrap" >现工作单位:${data.currentEmployer_secondary || "-"
                  }</p>
                  <p style="margin-bottom: 5px;">职务:${
                    data.jobTitle || "-"
                  <p style="margin-bottom: 5px;">职务:${data.jobTitle || "-"
                  }</p>
                  <p style="margin-bottom: 5px;">职称:${
                    data.professionalTitle || "-"
                  <p style="margin-bottom: 5px;">职称:${data.professionalTitle || "-"
                  }</p>
                  </div>
@@ -385,8 +332,7 @@
                <div style="width: 80px;height: 80px;position: relative; margin: 0 auto; margin-bottom: 10px;background: #D8D8D8;">
      <img class="autoImg"  src="${require("@/assets/images/directory/touxiang.png")}" alt="">
                  </div>
                <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${
                  data.name
                <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${data.name
                }</div>
                <div>   <span> ${data.academicDegreeName || "-"} </span></div>
   
@@ -523,6 +469,8 @@
        })
        .then((res) => {
          let arrList = [];
          console.log(this.unitList, "unitList");
          console.log(this.academicDegreeList, "this.academicDegreeList");
          this.unitList.forEach((item) => {
            this.academicDegreeList.forEach((citem) => {
              arrList.push({
@@ -543,9 +491,9 @@
              });
            });
          });
          this.loading = false;
          console.log(res, "res");
          console.log(arrList, "arrList");
          console.log(res, "res");
          if (res.datas && res.datas.length) {
            res.datas.forEach((item) => {
              arrList.forEach((citem) => {
@@ -561,10 +509,9 @@
                }
              });
            });
            console.log(arrList, "去除arrList");
            arrList = arrList.filter((item) => item.studentList.length);
            // console.log(arrList, "arrList");
            console.log(arrList, "arrList");
            this.universityList = arrList;
            this.chartData.children = arrList;
            const temp_chartData = {
@@ -572,9 +519,9 @@
              children: arrList,
            };
            this.chartData = temp_chartData;
            // console.log(this.chartData, "this.chartData");
            this.initChart();
            this.loading = false;
          }
        })
        .catch((error) => {
@@ -595,7 +542,6 @@
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: Source Han Sans;
}
.page-header {
@@ -671,6 +617,7 @@
  overflow: hidden;
  margin-bottom: 100px;
  padding-top: 50px;
  table {
    width: 100%;
    border-collapse: collapse;
@@ -797,6 +744,7 @@
.tagText {
  margin-left: 30px;
}
::v-deep .el-loading-spinner {
  color: #937950 !important;
}
src/views/honors/index.vue
@@ -340,5 +340,10 @@
  color: #fff;
  border-radius: 5px;
  border: 1px solid#cccccc;
}
//修改鼠标滑过的颜色
:deep.el-pagination.is-background .el-pager li:not(.disabled):hover{
  color: #937950
}
</style>