shaogen1995 3 лет назад
Родитель
Сommit
5d3c62282b

+ 11 - 0
webM/package-lock.json

@@ -17,6 +17,7 @@
         "v-viewer": "^1.6.4",
         "vue": "^2.6.11",
         "vue-awesome-swiper": "^4.1.1",
+        "vue-lazyload": "^1.3.3",
         "vue-router": "^3.2.0"
       },
       "devDependencies": {
@@ -13895,6 +13896,11 @@
       "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
       "dev": true
     },
+    "node_modules/vue-lazyload": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.3.3.tgz",
+      "integrity": "sha512-uHnq0FTEeNmqnbBC2aRKlmtd9LofMZ6Q3mWvgfLa+i9vhxU8fDK+nGs9c1iVT85axSua/AUnMttIq3xPaU9G3A=="
+    },
     "node_modules/vue-loader": {
       "version": "15.9.8",
       "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.8.tgz",
@@ -26431,6 +26437,11 @@
       "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
       "dev": true
     },
+    "vue-lazyload": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.3.3.tgz",
+      "integrity": "sha512-uHnq0FTEeNmqnbBC2aRKlmtd9LofMZ6Q3mWvgfLa+i9vhxU8fDK+nGs9c1iVT85axSua/AUnMttIq3xPaU9G3A=="
+    },
     "vue-loader": {
       "version": "15.9.8",
       "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.8.tgz",

+ 1 - 0
webM/package.json

@@ -19,6 +19,7 @@
     "v-viewer": "^1.6.4",
     "vue": "^2.6.11",
     "vue-awesome-swiper": "^4.1.1",
+    "vue-lazyload": "^1.3.3",
     "vue-router": "^3.2.0"
   },
   "devDependencies": {

+ 11 - 0
webM/src/assets/css/base.css

@@ -73,4 +73,15 @@ ul li {
 }
 .el-image-viewer__actions{
   width: 120px;
+}
+/* 图片预览 */
+.el-image-viewer__prev{
+  left: 10px;
+}
+.el-image-viewer__next{
+  right: 10px;
+}
+.el-image-viewer__close{
+  top: 15px;
+  right: 15px;
 }

BIN
webM/src/assets/imgM/IMGerror.png


BIN
webM/src/assets/imgM/bigBac.png


BIN
webM/src/assets/imgM/loading.gif


BIN
webM/src/assets/imgM/tb3TopAc.png


+ 7 - 0
webM/src/main.js

@@ -8,6 +8,13 @@ import './assets/css/base.css'
 import moment from 'moment'
 import 'moment/locale/zh-cn'
 
+// 图片懒加载
+import VueLazyLoad from 'vue-lazyload'
+Vue.use(VueLazyLoad, {
+  error: require('./assets/imgM/IMGerror.png'),
+  loading: require('./assets/imgM/loading.gif')
+})
+
 import 'viewerjs/dist/viewer.css'
 import Viewer from 'v-viewer'
 Vue.prototype.moment = moment

+ 5 - 5
webM/src/pages/Home.vue

@@ -11,25 +11,25 @@
     <div
       class="all"
       :class="{ activeAll: cutTab }"
-      @touchstart="cutTab = !cutTab"
+      @click="cutTab = !cutTab"
     ></div>
      <div class="tab" :class="{ active: cutTab }" v-show="cutTab">
       <div
         class="small small1"
-        @touchstart="jump('tab1')"
+        @click="jump('tab1')"
       >
         <img src='../assets/imgM/tab1Ac.png' alt="" />
         <p>数字史馆</p>
       </div>
-      <div class="small small2" @touchstart="jump('tab2')">
+      <div class="small small2" @click="jump('tab2')">
         <img src='../assets/imgM/tab2.png' alt="" />
         <p>校园全景</p>
       </div>
-      <div class="small small3" @touchstart="jump('tab3')">
+      <div class="small small3" @click="jump('tab3')">
         <img src='../assets/imgM/tab3.png' alt="" />
         <p>文物典藏</p>
       </div>
-      <div class="small small4" @touchstart="jump('tab4')">
+      <div class="small small4" @click="jump('tab4')">
         <img src='../assets/imgM/tab4.png' alt="" />
         <p>信息检索</p>
       </div>

+ 1 - 1
webM/src/views/home/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="home">
-    <div class="btnR" @touchstart="goIndex">
+    <div class="btnR" @click="goIndex">
       <p>进 入</p>
       <p>史 馆</p>
     </div>

+ 5 - 5
webM/src/views/layout/index.vue

@@ -5,13 +5,13 @@
       class="all"
        v-show="$route.meta.myInd"
       :class="{ activeAll: cutTab }"
-      @touchstart="cutTab = !cutTab"
+      @click="cutTab = !cutTab"
     ></div>
     <div class="tab" :class="{ active: cutTab }" v-show="cutTab">
       <div
         class="small small1"
         :class="{ activeSmall: $route.meta.myInd === 1 }"
-        @touchstart="jump('tab1')"
+        @click="jump('tab1')"
       >
         <img
           :src="
@@ -26,7 +26,7 @@
       <div
         class="small small2"
         :class="{ activeSmall: $route.meta.myInd === 2 }"
-        @touchstart="jump('tab2')"
+        @click="jump('tab2')"
       >
         <img
           :src="
@@ -41,7 +41,7 @@
       <div
         class="small small3"
         :class="{ activeSmall: $route.meta.myInd === 3 }"
-        @touchstart="jump('tab3')"
+        @click="jump('tab3')"
       >
         <img
           :src="
@@ -56,7 +56,7 @@
       <div
         class="small small4"
         :class="{ activeSmall: $route.meta.myInd === 4 }"
-        @touchstart="jump('tab4')"
+        @click="jump('tab4')"
       >
         <img
           :src="

+ 1 - 1
webM/src/views/tab2/index.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-<div class='tab2'>tab2</div>
+<div class='tab2'>校园全景,等待开发</div>
 </template>
 
 <script>

+ 256 - 563
webM/src/views/tab3/index.vue

@@ -1,118 +1,73 @@
-<!--  -->
 <template>
   <div class="tab3">
-    <div class="left">
-      <ul>
-        <li
-          :class="{ active: formData.type === item.type }"
-          v-for="item in listData"
-          :key="item.id"
-          @click="cutTab(item)"
-        >
-          <p v-if="formData.type === item.type">
-            ★&nbsp;{{ item.name }}&nbsp;★
-          </p>
-          <p v-else>{{ item.name }}</p>
-          <span> {{ item.biaoshi }} </span>
-        </li>
-      </ul>
-      <div class="search" @keyup.enter="mySearch">
-        <el-input
-          placeholder="请输入关键词..."
-          suffix-icon="el-icon-search"
-          v-model="formData.searchKey"
-        >
-        </el-input>
-        <span class="btn" @click="mySearch"></span>
+    <div class="top">
+      <div
+        @click="cutChange(item)"
+        :class="{ active: topArrInd === item.id }"
+        v-for="(item, index) in topArr"
+        :key="index"
+      >
+        {{ item.name }}
       </div>
     </div>
-    <!-- 右侧内容 -->
-    <!-- 没有数据时 -->
-    <div class="hint" v-if="myArr.length === 0">
-      <img src="@/assets/img/nullData.png" alt="">
-      <p>暂无查询数据</p>
+    <!-- 实物模型的盒子 -->
+    <div class="modelBox" v-show="topArrInd === 1">
+      <div
+        class="modelSon"
+        v-for="item in dataArr"
+        :key="item.id"
+        @click="modelClick(item)"
+      >
+        <img v-lazy="baseURL + item.thumb" alt="" />
+        <p>{{ item.name }}</p>
+      </div>
     </div>
-    <div class="right" v-else>
-      <div class="row" v-for="item in myArr" :key="item.id">
-        <!-- 模型/视频 -->
-        <img
-          @click="goodClick(item)"
-          :src="baseURL + item.thumb"
-          alt=""
-          v-if="formData.type === 'model' || formData.type === 'video'"
-          :class="{ vidAc: formData.type === 'video' }"
-        />
-        <!-- 图库 -->
+
+    <!-- 专题图库的盒子 -->
+    <div class="imgBox" v-show="topArrInd === 2">
+      <div
+        class="imgSon"
+        v-for="item in dataArr"
+        :key="item.id"
+        @click="imgClick(item)"
+      >
         <el-image
-          @click="goodClick(item)"
-          v-else-if="formData.type === 'img'"
-          style="width: 351px; height: 200px"
+          lazy
           :src="baseURL + item.thumb"
           :preview-src-list="srcList"
-        >
-        </el-image>
-
-        <!-- 视频的鼠标移上去的遮照 -->
-        <div
-          class="videoSM"
-          v-if="formData.type === 'video'"
-          @click="goodClick(item)"
-        >
-          <img src="../../assets/img/playMove.png" alt="" />
-          <p>{{ item.name }}</p>
-        </div>
-
-        <div
-          class="listTxt"
-          :title="item.name"
-          :class="{
-            imgAc: formData.type === 'img',
-            vidAcTxt: formData.type === 'video',
-          }"
-        >
-          <img
-            src="../../assets/img/play.png"
-            alt=""
-            v-if="formData.type === 'video'"
-          />
-          {{ item.name }}
-          <div class="right_bac" v-if="formData.type === 'model'"></div>
-        </div>
+          style="width: 165px; height: 164px"
+        />
+        <p>{{ item.name }}</p>
       </div>
-      <!-- 分页 -->
-      <div class="paging">
-        <el-pagination
-          layout="prev,pager,next,jumper"
-          :total="total"
-          :page-size="8"
-          :current-page="formData.pageNum"
-          @current-change="currentChange"
-          @size-change="sizeChange"
-        >
-        </el-pagination>
+    </div>
+
+    <!-- 视频档案的盒子 -->
+    <div class="videoBox" v-show="topArrInd === 3">
+      <div
+        class="videoSon"
+        v-for="item in dataArr"
+        :key="item.id"
+        @click="videoClick(item)"
+      >
+        <img v-lazy="baseURL + item.thumb" alt="" />
+        <p>{{ item.name }}</p>
       </div>
     </div>
+
     <!-- 点击文物出现的弹窗 -->
-    <div class="model" v-if="modelShow">
-      <div class="ifrCon" ref="ifrCon">
-        <iframe :src="mySrc" frameborder="0"></iframe>
-        <!-- 关闭按钮 -->
-        <div class="btnX el-icon-close" @click="modelShow = false"></div>
-        <!-- 全屏按钮 -->
-        <div class="full" @click="screen">
-          <img src="../../assets/img/tab3FullX.png" alt="" v-if="fullscreen">
-          <img src="../../assets/img/tab3Full.png" alt="" v-else>
-        </div>
-      </div>
+    <div class="modelDialog" v-if="modelShow">
+      <iframe :src="modelSrc" frameborder="0"></iframe>
+      <!-- 关闭按钮 -->
+      <div class="btnX el-icon-close" @click="modelShow = false"></div>
     </div>
     <!-- 大图预览里面的文字显示 -->
-    <div class="imgBigShow" v-if="imgBigShow">
+    <div class="imgDialog" v-if="imgBigShow">
       {{ imgBigNum }} / {{ srcList.length }}
     </div>
     <!-- 视频档案里面的弹窗 -->
     <div class="model" v-if="myVideoShow">
       <!-- 关闭按钮 -->
-      <div class="videoPlay">
+      <div class="videoDialog">
         <div class="btnX el-icon-close" @click="myVideoShow = false"></div>
         <video :src="myVideoSrc" v-if="myVideoSrc" controls autoplay></video>
       </div>
@@ -127,544 +82,256 @@ export default {
   name: "tab3",
   components: {},
   data() {
-    // 这里存放数据
     return {
-      total: 0,
       baseURL: "",
-      fullscreen: false,
-      modelShow: false,
-      listData: [
-        { biaoshi: "/", id: 1, name: "实物模型", type: "model" },
-        { biaoshi: "/", id: 2, name: "专题图库", type: "img" },
-        { biaoshi: "", id: 3, name: "视频档案", type: "video" },
+      topArrInd: 1,
+      topArr: [
+        { id: 1, name: "实物模型", type: "model" },
+        { id: 2, name: "专题图库", type: "img" },
+        { id: 3, name: "视频档案", type: "video" },
       ],
       formData: {
         pageNum: 1,
-        pageSize: 8,
+        pageSize: 99999,
         searchKey: "",
         type: "model",
       },
-      myArr: [],
-      mySrc: "",
-      srcList: [""],
-      // 大图预览里面的文字显示
+      dataArr: [],
+      // 有关模型的数据
+      modelShow: false,
+      modelSrc: "",
+      // 有关专题图库的数据
       imgBigShow: false,
       imgBigNum: 1,
-      // 视频档案数据
+      srcList: [""],
+      // 有关视频档案的数据
       myVideoShow: false,
       myVideoSrc: "",
     };
   },
-  // 监听属性 类似于data概念
   computed: {},
-  // 监控data中的数据变化
-  watch: {},
-  // 方法集合
   methods: {
-    // 分页器方法
-    currentChange(val) {
-      // console.log('当前页改变了', val)
-      this.formData.pageNum = val;
-      this.goodList(this.formData);
-    },
-    sizeChange(val) {
-      // console.log('条数改变了', val)
-      this.formData.pageNum = 1;
-      this.formData.pageSize = val;
-      this.goodList(this.formData);
-    },
-    // 点击模型全屏
-    screen() {
-      const element = this.$refs.ifrCon; // 获取容器
-      if (this.fullscreen) {
-        // 如果已经全屏了就退出全屏
-
-        if (document.exitFullscreen) {
-          document.exitFullscreen();
-        } else if (document.webkitCancelFullScreen) {
-          document.webkitCancelFullScreen();
-        } else if (document.mozCancelFullScreen) {
-          document.mozCancelFullScreen();
-        } else if (document.msExitFullscreen) {
-          document.msExitFullscreen();
-        }
-      } else {
-        // 如果不是全屏就变成全屏
-        if (element.requestFullscreen) {
-          element.requestFullscreen();
-        } else if (element.webkitRequestFullScreen) {
-          element.webkitRequestFullScreen();
-        } else if (element.mozRequestFullScreen) {
-          element.mozRequestFullScreen();
-        } else if (element.msRequestFullscreen) {
-          // IE11
-          element.msRequestFullscreen();
-        }
-      }
-
-      this.fullscreen = !this.fullscreen;
+    // 切换顶部tab栏
+    cutChange(item) {
+      this.dataArr = [];
+      this.topArrInd = item.id;
+      this.goodList({ ...this.formData, type: item.type });
     },
     // 点击模型
-    async goodClick(item) {
-      if (item.type === "model") {
-        this.mySrc = "4dage/Model.html?m=" + item.filePath;
-        // this.mySrc = '/4dage/Model.html'
-        this.modelShow = true;
-      } else if (item.type === "img") {
-        this.imgBigNum = 1;
-        const res = await goodDetail(item.id);
-        // console.log(998, res)
-        const temp = [];
-        res.data.file.forEach((v) => {
-          // console.log(998, v)
-          if (v.isIndex === 1) temp.push(this.baseURL + v.filePath);
-          else {
-            setTimeout(() => {
-              temp.push(this.baseURL + v.filePath);
-            }, 0);
-          }
-        });
-        this.srcList = temp;
-        this.$nextTick(() => {
-          setTimeout(() => {
-            this.imgBigShow = true;
-            //因为污染自己写滚轮缩放
-            document
-              .querySelector(".el-image-viewer__wrapper")
-              .addEventListener("mousewheel", (event) => {
-                let delta = 0;
-                if (!event) event = window.event;
-                if (event.wheelDelta) {
-                  delta = event.wheelDelta / 120;
-                  if (window.opera) delta = -delta;
-                } else if (event.detail) {
-                  delta = -event.detail / 3;
-                }
-                let img = document.querySelector(".el-image-viewer__img");
-                if (delta > 0) {
-                  let width = img.width;
-                  img.width = width * 1.1;
-                } else if (delta < 0) {
-                  let width = img.width;
-                  if (width > 100) {
-                    img.width = width * 0.9;
-                  }
-                }
-              });
-            const myTemp = document.querySelector(".el-image-viewer__mask");
-            myTemp.addEventListener("click", () => {
-              this.imgBigShow = false;
-            });
-            const temp = document.querySelector(".el-image-viewer__close");
-            temp.addEventListener("click", () => {
-              this.imgBigShow = false;
-              this.srcList = [""];
-              // console.log('我点了里面的关闭')
-            });
-            // 左按钮
-            const tempLeft = document.querySelector(".el-image-viewer__prev");
-            tempLeft.addEventListener("click", () => {
-              this.imgBigNum--;
-              if (this.imgBigNum === 0) this.imgBigNum = this.srcList.length;
-            });
-            // 右按钮
-            const tempRight = document.querySelector(".el-image-viewer__next");
-            tempRight.addEventListener("click", () => {
-              this.imgBigNum++;
-              if (this.imgBigNum === this.srcList.length + 1)
-                this.imgBigNum = 1;
-            });
-          }, 100);
-        });
-      } else if (item.type === "video") {
-        this.myVideoShow = true;
-        this.myVideoSrc = this.baseURL + item.filePath;
-      }
+    async modelClick(item) {
+      this.modelSrc = "4dage/Model.html?m=" + item.filePath;
+      this.modelShow = true;
       // 记录访问量
       await webVisit("goods", item.id);
     },
-    cutTab(val) {
-      if (this.formData.type === val.type) return;
-      this.formData.pageNum = 1;
-      this.formData.type = val.type;
-      this.goodList(this.formData);
+    // 点击图库
+    async imgClick(item) {
+      this.imgBigNum = 1;
+      const res = await goodDetail(item.id);
+      // console.log(998, res)
+      const temp = [];
+      res.data.file.forEach((v) => {
+        // console.log(998, v)
+        if (v.isIndex === 1) temp.push(this.baseURL + v.filePath);
+        else {
+          setTimeout(() => {
+            temp.push(this.baseURL + v.filePath);
+          }, 0);
+        }
+      });
+      this.srcList = temp;
+      this.$nextTick(() => {
+        setTimeout(() => {
+          this.imgBigShow = true;
+          const myTemp = document.querySelector(".el-image-viewer__mask");
+          myTemp.addEventListener("click", () => {
+            this.imgBigShow = false;
+          });
+          const temp = document.querySelector(".el-image-viewer__close");
+          temp.addEventListener("click", () => {
+            this.imgBigShow = false;
+            this.srcList = [""];
+            // console.log('我点了里面的关闭')
+          });
+          // 左按钮
+          const tempLeft = document.querySelector(".el-image-viewer__prev");
+          tempLeft.addEventListener("click", () => {
+            this.imgBigNum--;
+            if (this.imgBigNum === 0) this.imgBigNum = this.srcList.length;
+          });
+          // 右按钮
+          const tempRight = document.querySelector(".el-image-viewer__next");
+          tempRight.addEventListener("click", () => {
+            this.imgBigNum++;
+            if (this.imgBigNum === this.srcList.length + 1) this.imgBigNum = 1;
+          });
+        }, 100);
+      });
+      // 记录访问量
+      await webVisit("goods", item.id);
     },
-    mySearch() {
-      this.formData.pageNum = 1;
-      this.goodList(this.formData);
+    // 点击视频档案
+    async videoClick(item) {
+      this.myVideoShow = true;
+      this.myVideoSrc = this.baseURL + item.filePath;
+      // 记录访问量
+      await webVisit("goods", item.id);
     },
     // 封装获取列表函数
     async goodList(data) {
       const res = await goodList(data);
-      this.total = res.data.total;
-      this.myArr = res.data.records;
-      // if (this.formData.type === 'img') {
-      //   this.myArr.forEach(v => {
-      //     this.srcList = [this.baseURL + v.thumb]
-      //   })
-      // }
-      // console.log(998, res)
+      this.dataArr = res.data.records;
     },
   },
-  // 生命周期 - 创建完成(可以访问当前this实例)
+  //生命周期 - 创建完成(可以访问当前this实例)
   created() {
     // 获取服务器前缀地址
     this.baseURL = axios.defaults.baseURL;
     this.goodList(this.formData);
   },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    // 监听esc事件
-    document.addEventListener("webkitfullscreenchange", (e) => {
-      if (!e.currentTarget.webkitIsFullScreen) {
-        // console.log('退出啊webkitIsFullScreen11111111111')
-        setTimeout(() => {
-          this.fullscreen = false;
-        }, 100);
-      } else {
-        // console.log('进入webkitIsFullScreen')
-      }
-    });
-
-    document.addEventListener("fullscreenchange", () => {
-      if (!document.fullscreenElement) {
-        // console.log('退出啊fullscreenchange1111111111')
-        setTimeout(() => {
-          this.fullscreen = false;
-        }, 100);
-      } else {
-        // console.log('进入fullscreenchange')
-      }
-    });
-
-    document.addEventListener("MSFullscreenChange", () => {
-      if (!document.msFullscreenElement) {
-        // console.log('IE退出111111')
-        setTimeout(() => {
-          this.fullscreen = false;
-        }, 100);
-      } else {
-        // console.log('IE进')
-      }
-    });
-    document.addEventListener("mozfullscreenchange", () => {
-      if (!document.mozFullScreenElement) {
-        // console.log('火狐退出1111111111111')
-        this.$nextTick(() => {
-          setTimeout(() => {
-            this.fullscreen = false;
-          }, 100);
-        });
-      } else {
-        // console.log('火狐进')
-      }
-    });
-  },
-  beforeCreate() {}, // 生命周期 - 创建之前
-  beforeMount() {}, // 生命周期 - 挂载之前
-  beforeUpdate() {}, // 生命周期 - 更新之前
-  updated() {}, // 生命周期 - 更新之后
-  beforeDestroy() {}, // 生命周期 - 销毁之前
-  destroyed() {}, // 生命周期 - 销毁完成
-  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style lang='less' scoped>
 .tab3 {
   width: 100%;
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  color: #3e3e3e;
-  .left {
-    position: relative;
+  min-height: 100vh;
+  background: url("../../assets/imgM/bigBac.png");
+  .top {
     width: 100%;
-    height: 180px;
-    background: url("../../assets/img/tab3Tab.png");
-    background-size: 100% 100%;
-    ul {
-      padding-left: 40px;
-      display: flex;
-      height: 100%;
-      align-items: center;
-      justify-content: center;
-      li {
-        display: flex;
-        justify-content: center;
-        font-size: 20px;
-        color: #fff;
-        width: 240px;
-        cursor: pointer;
-        &:hover {
-          color: #f2cd83;
-        }
-        & > span {
-          margin-left: 50px;
-          color: #fff !important;
-        }
-        & > p {
-          text-align: center;
-          width: 145px;
-        }
-      }
-      .active {
-        color: #f2cd83;
-      }
+    height: 45px;
+    background-color: rgba(255, 255, 255, 0.7);
+    display: flex;
+    justify-content: space-around;
+    & > div {
+      width: 78px;
+      height: 45px;
+      line-height: 45px;
+      text-align: right;
     }
-    .search {
-      z-index: 10;
-      /*修改提示文字的颜色*/
-      /deep/input::-webkit-input-placeholder {
-        /* WebKit browsers */
-        color: #be1220;
-      }
-      /deep/input:-moz-placeholder {
-        /* Mozilla Firefox 4 to 18 */
-        color: #be1220;
-      }
-      /deep/input::-moz-placeholder {
-        /* Mozilla Firefox 19+ */
-        color: #be1220;
-      }
-      /deep/input:-ms-input-placeholder {
-        /* Internet Explorer 10+ */
-        color: #be1220;
-      }
-
-      width: 700px;
-      height: 50px;
-      position: absolute;
-      bottom: -25px;
-      left: 50%;
-      transform: translateX(-50%);
-      /deep/.el-input__suffix {
-        width: 50px;
-        height: 50px;
-        font-size: 20px;
-        right: 0;
-      }
-      /deep/.el-input__inner {
-        border-radius: 50px;
-        height: 50px;
-        border: 1px solid #be1220;
+    .active {
+      padding-left: 20px;
+      background: url("../../assets/imgM/tb3TopAc.png") no-repeat center left;
+      color: #b92e2e;
+      font-weight: 700;
+    }
+  }
+  // 实物模型
+  .modelBox {
+    padding: 10px;
+    .modelSon {
+      position: relative;
+      width: 100%;
+      margin-bottom: 10px;
+      & > img {
+        width: 100%;
       }
-      .btn {
-        cursor: pointer;
+      & > P {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        padding: 0 10px;
         position: absolute;
-        right: 0;
-        top: 0;
-        height: 50px;
-        width: 50px;
-        border-radius: 50%;
-        background-color: transparent;
+        text-align: center;
+        bottom: 0;
+        left: 0;
+        width: 100%;
+        height: 24px;
+        color: #fff;
+        font-size: 16px;
       }
     }
   }
-  .hint {
-  display: block !important;
-  height: 500px !important;
-  &>img{
-    margin: 200px auto 30px;
-    display: block;
-    width: 150px;
-    height: 150px;
-  }
-  &>p{
-    text-align: center;
-    font-size: 18px;
-    color: #AC1D29;
-  }  
-  }
-  .right {
-    padding: 0 200px;
-    padding-top: 50px;
-    position: relative;
-    justify-content: start;
-    align-content: flex-start;
+  // 专题图库
+  .imgBox {
+    padding: 10px;
+    padding-right: 0;
     display: flex;
+    justify-content: center;
     flex-wrap: wrap;
-    min-width: 1200px;
-    flex: 1;
-    height: 825px;
-    .row {
-      position: relative;
+    .imgSon {
+      margin-right: 10px;
+      width: 165px;
+      height: 194px;
       background-color: #fff;
       box-shadow: 1px 1px 2px 2px #ccc;
-      margin-right: 30px;
-      margin-bottom: 30px;
-      cursor: pointer;
-      width: 351px;
-      height: 240px;
-      text-align: center;
-      &:nth-of-type(4n) {
-        margin-right: 0;
-      }
+      margin-bottom: 10px;
       & > img {
         width: 100%;
-        height: 200px;
+        height: 164px;
         object-fit: cover;
       }
-      .vidAc {
-        height: 100%;
-      }
-      .listTxt {
-        position: relative;
+      & > p {
+        height: 30px;
+        line-height: 22px;
+        text-align: center;
         overflow: hidden;
         text-overflow: ellipsis;
         white-space: nowrap;
-        text-align: left;
-        height: 40px;
-        line-height: 40px;
-        padding: 0 50px 0 20px;
-        font-size: 20px;
-        color: #626260;
-        .right_bac {
-          position: absolute;
-          right: 5px;
-          top: 50%;
-          transform: translateY(-50%);
-          width: 28px;
-          height: 28px;
-          background: url("../../assets/img/enter.png");
-          background-size: 100% 100%;
-        }
-      }
-      .imgAc {
-        transform: translateY(-4px);
-        text-align: center;
-        padding: 0 15px;
-      }
-      .vidAcTxt {
-        font-size: 18px;
-        width: 351px;
-        background-color: rgba(0, 0, 0, 0.7);
-        position: absolute;
-        left: 0;
-        bottom: 0;
-        padding: 0 15px 0 20px;
-        color: #fff;
-        & > img {
-          width: 23px;
-          height: 23px;
-        }
+        padding: 0 10px;
       }
-      .videoSM {
-        z-index: 10;
-        text-align: center;
-        display: none;
-        position: absolute;
+    }
+  }
+  // 视频档案
+  .videoBox {
+    padding: 10px;
+    padding-right: 0;
+    display: flex;
+    justify-content: center;
+    flex-wrap: wrap;
+    .videoSon {
+      margin-right: 10px;
+      width: 165px;
+      height: 194px;
+      background-color: #fff;
+      box-shadow: 1px 1px 2px 2px #ccc;
+      margin-bottom: 10px;
+      & > img {
         width: 100%;
-        height: 100%;
-        top: 0;
-        left: 0;
-        background-color: rgba(80, 25, 25, 0.7);
-        & > img {
-          margin-top: 70px;
-          width: 83px;
-          height: 83px;
-        }
-        & > p {
-          padding: 0 10px;
-          text-align: center;
-          font-size: 18px;
-          color: #fff;
-          margin-top: 10px;
-        }
-      }
-      &:hover {
-        .listTxt {
-          background-color: #be1220;
-          color: #fff;
-          .right_bac {
-            background: url("../../assets/img/enterAc.png");
-            background-size: 100% 100%;
-          }
-        }
-        .vidAcTxt {
-          display: none;
-        }
-        .videoSM {
-          display: block;
-        }
+        height: 164px;
+        object-fit: cover;
       }
-    }
-    .paging {
-      position: absolute;
-      left: 50%;
-      bottom: 20px;
-      transform: translateX(-50%);
-      /deep/.el-input__inner {
-        width: 30px;
-        height: 30px !important;
-        background-color: transparent;
-        border-radius: 50%;
+      & > p {
+        height: 30px;
+        line-height: 30px;
+        text-align: center;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        padding: 0 10px;
       }
     }
   }
-  .model {
-    z-index: 1000;
+  // 模型弹窗
+  .modelDialog {
     position: fixed;
     top: 0;
     left: 0;
-    min-width: 1000px;
-    min-height: 600px;
     width: 100vw;
     height: 100vh;
-    background-color: rgba(0, 0, 0, 0.5);
-    .ifrCon {
-      border-top: 10px solid #be1220;
-      border-bottom: 10px solid #be1220;
-      position: absolute;
-      left: 50%;
-      top: 50%;
-      transform: translate(-50%, -50%);
-      width: 1000px;
-      height: 600px;
-      iframe {
-        width: 100%;
-        height: 100%;
-      }
-      .full {
-        width: 30px;
-        height: 30px;
-        cursor: pointer;
-        position: absolute;
-        right: 10px;
-        bottom: 10px;
-        color: #fff;
-        &>img{
-          width: 30px;
-          height: 30px;
-        }
-      }
+    background-color: rgba(0, 0, 0, 0.7);
+    iframe {
+      width: 100%;
+      height: 100%;
     }
     .btnX {
-      z-index: 999;
-      cursor: pointer;
       position: absolute;
-      right: 10px;
-      top: 10px;
-      color: #be1220;
-      font-size: 40px;
-    }
-
-    .videoPlay {
-      border-top: 10px solid #be1220;
-      border-bottom: 10px solid #be1220;
-      position: absolute;
-      top: 50%;
-      left: 50%;
-      transform: translate(-50%, -50%);
-      width: 800px;
-      height: auto;
-      video {
-        max-height: 90vh;
-        vertical-align: top;
-        width: 100%;
-      }
+      right: 15px;
+      top: 15px;
+      color: #fff;
+      font-size: 30px;
     }
   }
-  .imgBigShow {
+  // 图库弹窗图片数量
+  .imgDialog {
     padding: 3px 5px;
     background-color: rgba(0, 0, 0, 0.7);
     font-size: 18px;
@@ -675,5 +342,31 @@ export default {
     bottom: 100px;
     color: #fff;
   }
+  // 视频弹窗
+  .videoDialog {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100vw;
+    height: 100vh;
+    background-color: rgba(0, 0, 0, 0.7);
+    video {
+      position: absolute;
+      top: 50%;
+      left: 0;
+      transform: translateY(-50%);
+      max-height: 85vh;
+      vertical-align: top;
+      width: 100%;
+    }
+    .btnX {
+      z-index: 999;
+      position: absolute;
+      right: 15px;
+      top: 15px;
+      color: #fff;
+      font-size: 30px;
+    }
+  }
 }
-</style>
+</style>

+ 70 - 113
webM/src/views/tab4/index.vue

@@ -1,51 +1,43 @@
 <template>
-<div class='tab4'>
-  <div class="conten">
-    <div class="left">
-      <ul>
-        <li
-          :class="{ active: imgListInd===item.url }"
-          v-for="item in imgList"
-          :key="item.id"
-          @click="cutTab(item.url)"
-        >
-          <p v-if="imgListInd===item.url">
-            ★&nbsp;{{ item.name }}&nbsp;★
-          </p>
-          <p v-else>{{ item.name }}</p>
-          <span> {{ item.biaoshi }} </span>
-        </li>
-      </ul>
-    </div>
-      <!-- 动态组件 -->
-      <keep-alive>
-        <component :is="imgListInd"></component>
-      </keep-alive>
+  <div class="tab4">
+    <ul>
+      <li
+        :class="{ active: imgListInd === item.url }"
+        v-for="item in imgList"
+        :key="item.id"
+        @click="cutTab(item.url)"
+      >
+        {{ item.name }}
+      </li>
+    </ul>
+    <!-- 动态组件 -->
+    <keep-alive>
+      <component :is="imgListInd"></component>
+    </keep-alive>
   </div>
-</div>
 </template>
 
 <script>
-import tab4one from './tab4-1.vue'
-import tab4tow from './tab4-2.vue'
-import tab4three from './tab4-3.vue'
-import tab4four from './tab4-4.vue'
-import tab4five from './tab4-5.vue'
+import tab4one from "./tab4-1.vue";
+import tab4tow from "./tab4-2.vue";
+import tab4three from "./tab4-3.vue";
+import tab4four from "./tab4-4.vue";
+import tab4five from "./tab4-5.vue";
 export default {
-  name: 'tab4',
-  components: {tab4one,tab4tow,tab4three,tab4four,tab4five},
-  data () {
+  name: "tab4",
+  components: { tab4one, tab4tow, tab4three, tab4four, tab4five },
+  data() {
     // 这里存放数据
     return {
-      imgListInd: 'tab4one',
+      imgListInd: "tab4one",
       imgList: [
-        { id: 1, name: '学校宣传片', url: 'tab4one',biaoshi:'/' },
-        { id: 2, name: '美丽校园', url: 'tab4tow' ,biaoshi:'/'},
-        { id: 3, name: '军歌嘹亮', url: 'tab4three',biaoshi:'/' },
-        { id: 4, name: '历任学校领导', url: 'tab4four',biaoshi:'/' },
-        { id: 5, name: '学籍查询', url: 'tab4five' }
-      ]
-    }
+        { id: 1, name: "宣传片", url: "tab4one" },
+        { id: 2, name: "美丽校园", url: "tab4tow" },
+        { id: 3, name: "军歌嘹亮", url: "tab4three" },
+        { id: 4, name: "学校领导", url: "tab4four" },
+        { id: 5, name: "学籍查询", url: "tab4five" },
+      ],
+    };
   },
   // 监听属性 类似于data概念
   computed: {},
@@ -54,86 +46,51 @@ export default {
   // 方法集合
   methods: {
     // 点击顶部的tab栏切换
-    cutTab (val) {
-      this.imgListInd = val
-    }
+    cutTab(val) {
+      this.imgListInd = val;
+    },
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-  },
+  created() {},
   // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-
-  },
-  beforeCreate () {}, // 生命周期 - 创建之前
-  beforeMount () {}, // 生命周期 - 挂载之前
-  beforeUpdate () {}, // 生命周期 - 更新之前
-  updated () {}, // 生命周期 - 更新之后
-  beforeDestroy () {}, // 生命周期 - 销毁之前
-  destroyed () {}, // 生命周期 - 销毁完成
-  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
-}
+  mounted() {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
 </script>
 <style lang='less' scoped>
-.tab4{
-  height: 100%;
-    .conten{
-    height: 100%;
-    min-width: 1740px;
-      .left {
-    position: relative;
-    width: 100%;
-    height: 180px;
-    background: url("../../assets/img/tab4Tab.png");
-    background-size: 100% 100%;
-    ul {
-      padding-left: 40px;
-      display: flex;
-      height: 100%;
-      align-items: center;
-      justify-content: center;
-      li {
-        display: flex;
-        justify-content: center;
-        font-size: 20px;
-        color: #fff;
-        width: 240px;
-        cursor: pointer;
-        &:hover {
-          color: #f2cd83;
-        }
-        & > span {
-          margin-left: 50px;
-          color: #fff !important;
-        }
-        & > p {
-          text-align: center;
-          width: 145px;
-        }
-        &:nth-of-type(4){
-          &>p{
-            width: 165px;
-          }
-        }
-      }
-      .active {
-        color: #f2cd83;
-      }
+.tab4 {
+  /deep/::-webkit-scrollbar {
+    height: 0;
+    height: 0;
+    color: transparent;
+}
+  width: 100%;
+  min-height: 100vh;
+  background: url('../../assets/imgM/bigBac.png');
+  ul{
+    padding: 0 10px;
+    width: 100vw;
+    height: 45px;
+    background-color: rgba(255, 255, 255, 0.7);
+    overflow-x: auto;
+    display: flex;
+    &>li{
+      text-align: center;
+      min-width: 76px;
+      height: 45px;
+      line-height: 45px;
+      padding: 0 10px;
     }
-
-  }
-
-    .con_tab{
-      height: 700px;
-      }
-      .con_tab1{
-        display: flex;
-        justify-content: center;
-        video{
-          // width: 100%;
-          height: 100%;
-        }
-      }
+    .active{
+      border-bottom: 2px solid #B92E2E;
+      color: #B92E2E;
     }
+  }
 }
 </style>

+ 40 - 126
webM/src/views/tab4/tab4-1.vue

@@ -2,33 +2,24 @@
 <template>
   <div class="tab4-1" v-if="videoList.length !== 0">
     <!-- 左侧视频 -->
-    <div class="one_right">
-      <video
+    <div
+      class="videoBox"
+      v-for="item in videoList"
+      :key="item.id"
+      @click="videoChange(item)"
+    >
+      <div class="boxTop">
+        <img class="videoPlayIc" src="../../assets/img/playMove.png" alt="" />
+        <img class="imgShow" v-lazy="baseURL + item.thumb" alt="" />
+      </div>
+      <p>{{ item.name }}</p>
+      <!-- <video
         v-if="videoSrc"
         :src="baseURL + videoSrc"
         autoplay
         controls
       ></video>
-      <p>{{ videoTxt }}</p>
-    </div>
-    <!-- 右侧列表 -->
-    <div class="one_left">
-      <div
-        class="alone"
-        :class="{ active: videoInd === index }"
-        v-for="(item, index) in videoList"
-        :key="item.id"
-      >
-        <div class="video_name" :title="item.name">
-          <img src="../../assets/img/play.png" alt="" />{{ item.name }}
-        </div>
-        <img :src="baseURL + item.thumb" alt="" />
-        <!-- 鼠标移动上去的遮罩 -->
-        <div class="moveShow" @click="videoChange(item, index)">
-          <img src="../../assets/img/playMove.png" alt="" />
-          <p>{{ item.name }}</p>
-        </div>
-      </div>
+      <p>{{ videoTxt }}</p> -->
     </div>
   </div>
   <div class="tab4-1 conNull" v-else>暂 无 数 据</div>
@@ -89,124 +80,47 @@ export default {
 };
 </script>
 <style lang='less' scoped>
-/deep/::-webkit-scrollbar-thumb {
-  background-color: #D8B581 !important;
-  outline: 1px solid #D8B581 !important;
-  outline-offset: 0;
-}
 .conNull {
+  display: flex;
+  height: calc(100vh - 54px);
   font-size: 30px;
-  align-items: center;
-  justify-content: center;
   color: #b9412e;
+  display: flex;
+  justify-content: center;
+  align-items: center;
 }
 .tab4-1 {
-  padding: 30px 200px;
-  display: flex;
-  width: 100%;
-  height: 620px;
-  .one_left {
-    padding-right: 15px;
-    margin-left: 40px;
-    width: 350px;
-    height: 100%;
-    overflow-y: auto;
-    .alone {
+  padding: 10px;
+  .videoBox {
+    width: 100%;
+    height: auto;
+    background-color: #fff;
+    box-shadow: 1px 1px 2px 2px #ccc;
+    margin-bottom: 10px;
+    .boxTop {
       position: relative;
-      cursor: pointer;
       width: 100%;
-      height: 257px;
-      margin-bottom: 10px;
-      // border: 2px solid #b9412e;
-      .moveShow {
-        z-index: 10;
-        text-align: center;
-        display: none;
+      height: auto;
+      .videoPlayIc {
+        width: 54px;
+        height: 54px;
         position: absolute;
-        width: 100%;
-        height: 100%;
-        top: 0;
-        left: 0;
-        background-color: rgba(80, 25, 25, 0.7);
-        & > img {
-          margin-top: 70px;
-          width: 83px;
-          height: 83px;
-        }
-        & > p {
-          padding: 0 10px;
-          text-align: center;
-          font-size: 18px;
-          color: #fff;
-          margin-top: 10px;
-        }
-      }
-      &:hover {
-        // border: 2px solid #b9412e;
-        .video_name {
-          display: none;
-        }
-        .moveShow {
-          display: block;
-        }
+        left: 50%;
+        top: 50%;
+        transform: translate(-50%, -50%);
       }
-      &:last-child {
-        margin-bottom: 0;
-      }
-      & > img {
-        object-fit: cover;
-        width: 100%;
-        height: 100%;
-      }
-      .video_name {
-        padding: 0 5px;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
+      .imgShow {
         width: 100%;
-        position: absolute;
-        bottom: 0;
-        left: 0;
-        background-color: rgba(0, 0, 0, 0.6);
-        height: 35px;
-        line-height: 35px;
-        color: #fff;
-        text-align: center;
-        & > img {
-          margin-right: 5px;
-        }
-      }
-    }
-    .active {
-      border: 2px solid #b9412e;
-      &:hover{
-        .moveShow{
-          display: none;
-        }
-        .video_name {
-          display: block;
-        }
       }
     }
-  }
-  .one_right {
-    flex: 1;
-    position: relative;
-    & > video {
-      width: 100%;
-      height: 100%;
-    }
-    & > P {
-      width: 100%;
-      position: absolute;
-      top: 0;
-      left: 0;
-      padding: 0 10px;
-      font-size: 18px;
+    & > p {
       height: 40px;
       line-height: 40px;
-      color: #fff;
-      background-image: linear-gradient(to right, #b9412e, transparent);
+      text-align: center;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      padding: 0 10px;
     }
   }
 }