杨磊
2025-04-08 c88c65cd4f46e5dd9a0215d9cda13f07b498f4a7
src/views/achievements/index.vue
@@ -1,14 +1,651 @@
<template>
  <div>学术成果</div>
  <div class="page">
    <div class="page-header">
      <p>王永炎院士学术成果</p>
    </div>
    <div class="page-main">
      <!-- 搜索框 -->
      <ul class="page-input">
        <li class="input-main">
          <el-input placeholder="请输入内容" v-model="input3" class="input-with-select" suffix="搜索">
            <el-select v-model="select" slot="prepend" placeholder="请选择">
              <el-option v-for="(item, index) in optionlist" :key="index" :label="item.lable"
                :value="item.lable"></el-option>
            </el-select>
            <el-button slot="append">搜索</el-button>
          </el-input>
        </li>
        <li class="input-txt" @click="isDisplay = !isDisplay">
          高级检索
          <img :src="[isDisplay ? topIcon : bottomIcon]" alt="">
        </li>
      </ul>
      <!-- 高级搜索 -->
      <div v-if="isDisplay" class="page-search">
        <MyForm class="myfrom" @submit="
          (data) => {
            CurrentPage = 1;
            onSubmit(data);
          }
        " @reset="resetForm" :from="from" />
      </div>
      <!-- 搜索结果 -->
      <div class="page-content">
        <div class="content-left">
          <!-- 类型 -->
          <ul>
            <li class="left-title">
              <span>{{ category.title }}</span>
              <p @click="category.isDisplay = !category.isDisplay">
                <img :src="[category.isDisplay ? topIcon : bottomIcon]" alt="">
              </p>
            </li>
            <li class="left-main" v-if="category.isDisplay">
              <div class="category-main" v-for="(item, index) in category.list" :key="index">
                <el-checkbox class="el-checkbox" v-model="item.checked" :title="item.name">{{ item.name }}</el-checkbox>
                <span class="">{{ item.num }}</span>
              </div>
            </li>
          </ul>
          <!-- 年度 -->
          <ul>
            <li class="left-title">
              <div>
                <span>{{ annual.title }}</span>
                <span>
                  时间
                  <img class="sort-Icon" :src="[isDisplay ? sortTop : sortBottom]" alt="">
                </span>
                <span>文献量
                  <img class="sort-Icon" :src="[isDisplay ? sortBottom : sortTop]" alt="">
                </span>
              </div>
              <p @click="annual.isDisplay = !annual.isDisplay">
                <img :src="[annual.isDisplay ? topIcon : bottomIcon]" alt="">
              </p>
            </li>
            <li class="left-main" v-if="annual.isDisplay">
              <div class="annual-main" v-for="(item, index) in annual.list" :key="index">
                <el-checkbox class="el-checkbox" v-model="item.checked" :title="item.years">{{ item.years }}</el-checkbox>
                <span class="">{{ item.num }}</span>
              </div>
              <p class="annual-footer" v-if="annual.list && annual.list.length > 5">展开</p>
            </li>
          </ul>
          <!-- 文献来源 -->
          <ul>
            <li class="left-title">
              <div>
                <span>{{ sources.title }}</span>
                <span>
                  文献量
                  <img class="sort-Icon" :src="[isDisplay ? sortBottom : sortTop]" alt="">
                </span>
              </div>
              <p @click="sources.isDisplay = !sources.isDisplay">
                <img :src="[sources.isDisplay ? topIcon : bottomIcon]" alt="">
              </p>
            </li>
            <li class="left-main" v-if="sources.isDisplay">
              <div class="sources-main" v-for="(item, index) in sources.list" :key="index">
                <el-checkbox class="el-checkbox" :title="item.name" v-model="item.checked">{{ item.name }}</el-checkbox>
                <span class="">{{ item.num }}</span>
              </div>
              <p class="sources-footer" v-if="sources.list && sources.list.length > 5">展开</p>
            </li>
          </ul>
          <!-- 学科 -->
          <ul>
            <li class="left-title">
              <span>{{ subject.title }}</span>
              <p @click="subject.isDisplay = !subject.isDisplay">
                <img :src="[subject.isDisplay ? topIcon : bottomIcon]" alt="">
              </p>
            </li>
            <li class="left-main" v-if="subject.isDisplay">
              <div class="category-main" v-for="(item, index) in subject.list" :key="index">
                <el-checkbox class="el-checkbox" v-model="item.checked" :title="item.name">{{ item.name }}</el-checkbox>
                <span class="">{{ item.num }}</span>
              </div>
            </li>
          </ul>
        </div>
        <div class="content-right">
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import MyForm from '@/components/form/form.vue'
/* eslint-disable vue/no-unused-components */
export default {
  name: 'achievements',
  components: {
    MyForm
  },
  data() {
    return {
      topIcon: require("@/assets/images/achievements/top-Icon.png"),
      bottomIcon: require("@/assets/images/achievements/bottom-Icon.png"),
      sortTop: require("@/assets/images/achievements/sort-top.png"),
      sortBottom: require("@/assets/images/achievements/sort-bottom.png"),
      isDisplay: false,
      input3: '',
      select: '',
      checked: [],
      optionlist: [
        {
          lable: "标题"
        },
        {
          lable: "作者"
        },
        {
          lable: "年份"
        },
        {
          lable: "关键词"
        },
        {
          lable: "摘要"
        },
        {
          lable: "来源"
        },
      ],
      // 当前页
      CurrentPage: 1,
      // 高级搜索
      from: {
        from: [
          {
            type: "input",
            label: "标 题",
            name: "title",
            value: ""
          },
          {
            type: "input",
            label: "作 者",
            name: "author",
            value: ""
          },
          {
            type: "input",
            label: "年 份",
            name: "year",
            value: ""
          },
          {
            type: "input",
            label: "关键词",
            name: "keyword",
            value: ""
          },
          {
            type: "input",
            label: "摘 要",
            name: "abstract",
            value: ""
          },
          {
            type: "input",
            label: "来 源",
            name: "source",
            value: ""
          },
        ]
      },
      // 类型
      category: {
        title: "类型",
        isDisplay: true,
        id: "",
        index: "",
        list: [
          {
            name: "期刊",
            num: 190,
            check: false
          },
          {
            name: "图书",
            num: 190,
            check: false
          },
          {
            name: "视频",
            num: 190,
            check: false
          },
          {
            name: "音频",
            num: 190,
            check: false
          },
        ]
      },
      // 年度
      annual: {
        title: "年度",
        isDisplay: true,
        id: "",
        index: "",
        list: [
          {
            years: "2025",
            num: 20,
            check: false
          },
          {
            years: "2025",
            num: 20,
            check: false
          },
          {
            years: "2025",
            num: 20,
            check: false
          },
          {
            years: "2025",
            num: 20,
            check: false
          },
          {
            years: "2025",
            num: 20,
            check: false
          },
          {
            years: "2025",
            num: 20,
            check: false
          },
          {
            years: "2025",
            num: 20,
            check: false
          },
        ],
      },
      // 文献来源
      sources: {
        title: "文献来源",
        isDisplay: true,
        id: "",
        index: "",
        list: [
          {
            name: "北京中医药大学大学学报",
            num: 190,
            check: false
          },
          {
            name: "北京中医药大学大学学报",
            num: 190,
            check: false
          },
          {
            name: "北京中医药大学大学学报",
            num: 190,
            check: false
          },
          {
            name: "北京中医药大学大学学报",
            num: 190,
            check: false
          },
          {
            name: "北京中医药大学大学学报",
            num: 190,
            check: false
          },
          {
            name: "北京中医药大学大学学报",
            num: 190,
            check: false
          },
        ]
      },
      // 学科
      subject: {
        title: "学科",
        isDisplay: true,
        id: "",
        index: "",
        list: [
          {
            name: "医学",
            num: 190,
            check: false
          },
          {
            name: "医学",
            num: 190,
            check: false
          },
          {
            name: "医学",
            num: 190,
            check: false
          },
          {
            name: "医学",
            num: 190,
            check: false
          },
          {
            name: "医学",
            num: 190,
            check: false
          },
        ]
      },
      // 查询结果
      resultList:[
        {
            name:"中药闸柜的历史传承与新时代发展思考",
            sources:"北京中医药大学学报",
            time:"2025-02-24 09:21",
            title:"摘要: 中药闸柜是传统中药调剂的高级管理人员,在'前店后厂式'中药房发挥重要作用和关键职能。传承中药闸柜的宝贵学术经验与优秀文化对厘清中药学学科发展脉络、规范中药调剂技术操作、促进老药工技艺'活态传承'具有重要科学价值和现实意义。面向新时代、开启新思维,本文对老字号中药铺的兴起和中药闸柜进行考证,分析中药闸柜的岗位责任、传承路径及未来发展,提出高素质中药闸柜人才培养策略,旨在培养符合当代社会需求的中药行业复合型创新人才。",
            keyword:""
        }
      ]
    }
  },
  methods: {
    async onSubmit(val) {
    },
    //重置搜索结果
    resetForm() {
      // this.onSearch("");
    },
  }
}
</script>
<style>
<style lang="less" scoped>
.page {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background-color: #e9e1d4;
  overflow: auto;
}
.page-header {
  height: 102px;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  border-bottom: 2px solid #937950;
  p {
    padding: 35px 0 34px 0;
    font-family: Alimama DongFangDaKai;
    font-size: 30px;
    text-indent: 1em;
    border-bottom: 1px solid #937950;
  }
}
.page-main {
  width: 1330px;
  margin: 0 auto;
}
.page-input {
  width: 100%;
  display: flex;
  background-color: #fefbf5;
  border: 1px solid #E4DACE;
  .input-main {
    padding: 15px 0;
    text-align: center;
    width: 90%;
    border-right: 2px solid #E4DACE;
    .input-with-select {
      width: 50%;
    }
  }
  .input-txt {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10%;
    padding: 15px 0;
    font-family: Source Han Sans;
    font-size: 14px;
    font-weight: bold;
    color: #6F5A3A;
    cursor: pointer;
    img {
      width: 10px;
      height: auto;
      margin-left: 5px;
    }
  }
}
.page-search {
  width: 100%;
  background-color: #fefbf5;
  border-bottom: 1px solid #E4DACE;
  border-left: 1px solid #E4DACE;
  border-right: 1px solid #E4DACE;
  padding: 13px 0px;
  display: flex;
  justify-content: center;
  .myfrom {
    width: 80%;
    ::v-deep .flex-center {
      height: 80% !important;
    }
    ::v-deep .Formbtn {
      width: 100% !important;
      display: flex;
      justify-content: center;
      align-items: center;
      .el-button {
        width: 68px !important;
        height: 32px !important;
        font-size: 14px;
        background-color: transparent;
        color: #937950;
        border: 1px solid #6F5A3A;
        &:hover {
          background-color: #6F5A3A;
          color: #FFFDF8;
        }
      }
    }
  }
}
.page-content {
  width: 100%;
  margin-top: 20px;
  background-color: #fefbf5;
  border: 1px solid #E4DACE;
  display: flex;
  .content-left {
    width: 19.5%;
    border-right: 1px solid #E4DACE;
    border-bottom: 1px solid #E4DACE;
  }
  .left-title {
    padding: 7px 7px 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #E4DACE;
    span {
      margin-right: 20px;
      font-family: Source Han Sans;
      font-size: 14px;
      font-weight: bold;
    }
    .sort-Icon {
      cursor: pointer;
      height: 12px;
      width: auto;
    }
    img {
      cursor: pointer;
      height: 4px;
      width: auto;
    }
  }
  .left-main {
    border-bottom: 1px solid #E4DACE;
    padding: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .category-main {
    width: 50%;
    margin-bottom: 10px;
    span {
      font-family: Source Han Sans;
      font-size: 12px;
      color: #8F7A5A;
    }
  }
  .annual-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    span {
      font-family: Source Han Sans;
      font-size: 12px;
      color: #8F7A5A;
    }
  }
  .annual-footer {
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-family: Source Han Sans;
    font-size: 12px;
    font-weight: 350;
    color: #937950;
  }
  .sources-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    span {
      font-family: Source Han Sans;
      font-size: 12px;
      color: #8F7A5A;
    }
  }
  .el-checkbox {
    width: 70%;
  }
  /* 设置鼠标经过对勾框,对勾框边框的颜色 */
  ::v-deep .el-checkbox .el-checkbox__inner:hover {
    border-color: #D1D1D1;
  }
  /* 设置checkbox获得焦点后,对勾框的边框颜色 */
  ::v-deep .el-checkbox .el-checkbox__input.is-focus .el-checkbox__inner {
    border-color: #D1D1D1;
  }
  ::v-deep .el-checkbox .el-checkbox__input.is-checked+.el-checkbox__label {
    color: #2C2C2C;
  }
  ::v-deep .el-checkbox .el-checkbox__input.is-checked .el-checkbox__inner,
  ::v-deep .el-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    border-color: #8F7A5A;
    background-color: #8F7A5A;
  }
  ::v-deep .el-checkbox__label {
    color: #2C2C2C;
    width: 100%;
    font-family: Source Han Sans;
    font-size: 12px;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    /* 超出部分显示省略号 */
    vertical-align: middle;
  }
  .sources-footer {
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-family: Source Han Sans;
    font-size: 12px;
    font-weight: 350;
    color: #937950;
  }
  .content-right{
    width: 80.5%;
    padding: 14px 20px 20px 14px;
  }
}
el-input__suffix {
  right: 22px;
  color: #999;
}
</style>