Просмотр исходного кода

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/zhengzhou_university

xzw 4 лет назад
Родитель
Сommit
ebe742f9c2

+ 1 - 1
backstage/src/pages/content/Dynamic.vue

@@ -477,7 +477,7 @@ export default {
       this.tableData = result.data.list;
       this.total = result.data.total;
       this.tableData.forEach((item, i) => {
-        item["idx"] = i + 1;
+        item["idx"] = i + 1 + this.size * (this.currentPage-1);
         item["display"] = Boolean(item["display"]);
       });
     },

+ 1 - 1
backstage/src/pages/content/Spirit.vue

@@ -611,7 +611,7 @@ export default {
       this.tableData = result.data.list;
       this.total = result.data.total;
       this.tableData.forEach((item, i) => {
-        item["idx"] = i + 1;
+        item["idx"] = i + 1 + this.size * (this.currentPage-1);
         item["typeStr"] = typeStrs[item.type];
         let category = this.typeli.filter(i=>i.id==item.zoneId).length>0 && (this.typeli.filter(i=>i.id==item.zoneId))[0].name
         item["categoryStr"] = category

+ 2 - 2
backstage/src/pages/content/Upload.vue

@@ -26,7 +26,7 @@
           </el-table-column>
           <el-table-column label="操作">
             <template slot-scope="scope" >
-              <span class="o-span" @click="dowload(scope.row)">下载附件</span>
+              <span class="o-span" v-show="scope.row.code" @click="dowload(scope.row)">下载附件</span>
               <span class="o-span" @click="del(scope.row)">删除</span>
             </template>
           </el-table-column>
@@ -212,7 +212,7 @@ export default {
       this.tableData = result.data.list
       this.total = result.data.total
       this.tableData.forEach((item, i) => {
-        item["idx"] = i + 1;
+        item["idx"] = (i + 1) + this.size * (this.currentPage-1);
       });
     }
   }

+ 1 - 1
backstage/src/pages/system/Menu.vue

@@ -218,7 +218,7 @@ export default {
       this.tableData = result.data
       this.total = result.data.total
       this.tableData.forEach((item, i) => {
-        item["idx"] = i + 1;
+        item["idx"] = i + 1 + this.size * (this.currentPage-1);
       });
     }
   }

+ 2 - 1
backstage/src/pages/system/Worklog.vue

@@ -109,7 +109,8 @@ export default {
       this.tableData = result.data.list
       this.total = result.data.total
       this.tableData.forEach((item, i) => {
-        item['idx'] = i + 1
+        item["idx"] = i + 1 + this.size * (this.currentPage-1);
+
         item['typeName'] = TYPENAME[item.type]
         item['statusStr'] = STATUSNAME[item.status]
       })

+ 3 - 3
web/public/static/js/main_2020_show.js

@@ -15871,7 +15871,7 @@ window.Modernizr = function(n, e, t) {
 		hot.prototype.examine = function(e, options) { 
             options = options || {}
             
-            if(this.sid == 'OJCzKg113653'){
+            if(this.sid == 'OJCzKg113653'||this.sid == 'bzktyrv034419'){
                 return window.player.emit('loadLongVideo')
             }
             
@@ -15933,8 +15933,8 @@ window.Modernizr = function(n, e, t) {
                     //打开热点的时候把背景音乐关闭了,避免与热点里面的音乐冲突
                     //g_bgAudio && g_bgAudio.pause();
                     if(g_bgAudio && !g_bgAudio.paused){
-                        manage.switchBgmState(false); 
-                        g_bgAudio.pauseByHot = true
+                        // manage.switchBgmState(false); 
+                        // g_bgAudio.pauseByHot = true
                     } 
                     if(g_tourAudio)g_tourAudio.pause()
                     

+ 4 - 4
web/public/static/js/manage.js

@@ -108,7 +108,7 @@ Manage.prototype.loadWeixin = function() {
 Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
     g_bgAudio = new Audio;
     g_bgAudio.loop = true;
-    g_bgAudio.autoplay = true;
+    g_bgAudio.autoplay = false;
     g_bgAudio.id = "bgaudio";
     
     //https://www.cnblogs.com/interdrp/p/4211883.html   部分资料
@@ -116,7 +116,7 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
     var play = function(){
         //if(window.tourAudioSta) return;
          
-        this.switchBgmState(true)
+        // this.switchBgmState(true)
         
         document.removeEventListener("touchstart",play);
         document.removeEventListener("click",play);
@@ -124,10 +124,10 @@ Manage.prototype.loadAudio = function() { //相关:g_tourAudio \  g_playAudio
     }.bind(this);
     
     g_bgAudio.oncanplay = ()=>{ 
-        this.switchBgmState(true)
+        // this.switchBgmState(true)
     }
     document.addEventListener("WeixinJSBridgeReady", ()=> {
-        this.switchBgmState(true)
+        // this.switchBgmState(true)
     }, false);
     
     document.addEventListener("touchstart", play);//ios需要加个事件才能播放 不能自动播放;如果还有浏览器不行,换成别的交互事件

BIN
web/src/assets/images/loading.jpg


BIN
web/src/assets/images/videopost.jpg


BIN
web/src/assets/video/video.mp4


BIN
web/src/assets/video/welcome.mp4


+ 4 - 3
web/src/components/longvideo/index.vue

@@ -200,15 +200,16 @@ export default {
     >div{
       position: absolute;
       top: 0;
-      right: 0;
+      left: 50%;
+      transform: translateX(-50%);
       width: 50%;
       height: 100%;
       display: flex;
       align-items: center;
       justify-content: center;
-      background: rgba(0, 0, 0, 0.2);
+      // background: rgba(0, 0, 0, 0.2);
       >img{
-        width: 20px;
+        width: 30px;
         margin-right: 6px;
       }
       >span{

+ 7 - 5
web/src/components/mapsvg.vue

@@ -274,13 +274,15 @@
       <g id="_6"  @click="handleClick(6)" data-name="6">
         <path
           id="LJ5"
-          d="M5678.455,4972.729v-27.724h6.233v12.479h22.5v-30.4h-43.579v45.642h14.844Z"
+          d="M5678.455,4972.729v-27.724h6.233v12.479h22.5v-30.4h-43.579v45.642h14.844Z
+          M5762.25,4904.859v15.168h-55.088v37.457h14.782V4944.24h6.231v16.818h17.51v-24.672h24.032a14.454,14.454,0,0,1,14.412,14.411v.09c0,.107,0,.149-.005.3v.028a1.329,1.329,0,0,0,1.328,1.326,1.292,1.292,0,0,0,.55-.122,45.571,45.571,0,0,0,14.43-9.44,35.88,35.88,0,0,0,7.748-11.113,33.869,33.869,0,0,0,2.592-9.035,22.376,22.376,0,0,0,.244-3.729v-14.243Z
+          "
           transform="translate(31.698 -3371.177)"
           fill="#fcd67b"
           opacity="0.8"
           style="isolation: isolate"
         />
-        <g id="_2-3" data-name="2" transform="translate(5718.327 1562.561)">
+        <g id="_2-3" data-name="2" transform="translate(5748.327 1550.561)">
           <ellipse
             id="TR-6"
             data-name="TR"
@@ -308,7 +310,7 @@
             id="_6-2"
             data-name="6"
             class="hovertext"
-            transform="translate(-15.555 5.639)"
+            transform="translate(-5.255 5.839)"
             fill="#fcd67b"
             font-size="7"
             font-family="SourceHanSansCN-Medium, Source Han Sans CN"
@@ -320,7 +322,7 @@
           </text>
         </g>
       </g>
-      <g id="_7-2"  @click="handleClick(7)" data-name="7">
+      <!-- <g id="_7-2"  @click="handleClick(7)" data-name="7">
         <path
           id="LJ1"
           d="M5762.25,4904.859v14.468h-51.638v37.457h14.782V4944.24h6.231v16.818h17.51v-24.672h24.032a14.454,14.454,0,0,1,14.412,14.411v.09c0,.107,0,.149-.005.3v.028a1.329,1.329,0,0,0,1.328,1.326,1.292,1.292,0,0,0,.55-.122,45.571,45.571,0,0,0,14.43-9.44,35.88,35.88,0,0,0,7.748-11.113,33.869,33.869,0,0,0,2.592-9.035,22.376,22.376,0,0,0,.244-3.729v-14.243Z"
@@ -367,7 +369,7 @@
             <tspan x="0" y="0">信息系统工程学院</tspan>
           </text>
         </g>
-      </g>
+      </g> -->
       <g id="_1-2"  @click="handleClick(1)" data-name="1" opacity="0.8">
         <path
           id="LJ8"

+ 3 - 1
web/src/components/popupLayout/index.js

@@ -12,8 +12,8 @@ const Map = Vue.extend(UIMap)
 const Alert = Vue.extend(UIAlert)
 
 
-let alertInstance = ''
 export function $showAlert(data={}) {
+    let alertInstance = ''
     if (alertInstance) {
         return
     }
@@ -25,6 +25,8 @@ export function $showAlert(data={}) {
 
     Vue.nextTick(() => {
         alertInstance.show = true
+        console.log(alertInstance.show);
+
     })
 }
 

+ 14 - 4
web/src/components/welcome/index.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="welcome">
     <template v-show="!isVideo">
-      <img class="bg" :style="{'z-index': isVideo?-1:0}" :src="require('@/assets/images/bg.jpg')" alt="">
-      <div class="we_title">欢迎访问信息工程大学数字史馆</div>
+      <img class="bg" :style="{'z-index': isVideo?-1:0,opacity:isVideo?0:1}" :src="require('@/assets/images/bg.jpg')" alt="">
+      <div  v-if="!isVideo" class="we_title">欢迎访问信息工程大学数字史馆</div>
       <span v-if="!isVideo" class="btn" @click="showVideo">开始预览</span>
     </template>
-    <video @click="autoplay" ref="welcome" preload="auto" loop :src="require('@/assets/video/welcome.mp4')"></video>
+    <video @click="autoplay" ref="welcome" :style="{opacity:isVideo?1:0}" preload="auto" :poster="require('@/assets/images/videopost.jpg')" :src="require('@/assets/video/welcome.mp4')"></video>
     <span v-if="isVideo" class="btn jump" @click="$bus.$emit('toggleWelcome', false)">跳过</span>
   </div>
 </template>
@@ -31,6 +31,13 @@ export default {
     }
   },
   mounted(){
+
+     this.$nextTick(()=> {
+        this.$refs.welcome && this.$refs.welcome.addEventListener('ended',()=>{
+          this.$bus.$emit('toggleWelcome', false)
+        })
+      })
+    
     // this.autoplay()
   }
 }
@@ -45,6 +52,7 @@ export default {
   height: 100%;
   background-color: #000;
   z-index: 999;
+  transition: all ease 0.3s;
   .bg{
     width: 100%;
     height: 100%;
@@ -55,7 +63,7 @@ export default {
     
   }
   .we_title{
-    background-color: none;
+    background: none;
     position: absolute;
     top: 35%;
     left: 50%;
@@ -64,6 +72,8 @@ export default {
     color: #FCD67B;
     letter-spacing: 6px;
     font-weight: bold;
+    width: 100%;
+    text-align: center;
   }
   >video{
     width: 100%;

+ 5 - 1
web/src/pages/Home.vue

@@ -16,7 +16,8 @@
 
             <!-- 退出VR模式按钮 -->
             <div id="vrOff">
-                <img id="vrOffImg" src="images/vrOffImg.png" alt="">
+                <!--  -->
+                <img id="vrOffImg" :src="require('@/assets/images/vrOffImg.png')" alt="">
             </div>
 
             <!-- 热点列表 -->
@@ -176,6 +177,9 @@ export default {
         else{
           this.showWelcome = data
         }
+        if (!data) {
+            manage.switchBgmState(true); 
+        }
     })
     
     this.$bus.$on('toggleLongVideo',data=>{

+ 1 - 1
web/src/utils/file.js

@@ -7,7 +7,7 @@ export const mediaTypes = {
 
 // 媒体扩展类型
 export const mediaMimes = {
-    "application":['x-tar','x-compressed','x-zip-compressed','zip','tar'], //压缩包
+    "application":['x-tar','x-rar-compressed','x-compressed','octet-stream', 'x-zip-compressed','zip','tar','rar'], //压缩包
     "image": ["jpg", "png", "jpeg", "bmp", "gif"],
     "audio": ["mp3", "aac", "ogg", "wav" /* , "m4a" */],
     "video": ["mp4", "mov", "quicktime" /* ,"webm", "rmvb", "wmv" */] //ios:mov

+ 2 - 1
web/src/views/gui/newguide.vue

@@ -14,7 +14,7 @@
           :key="i"
         >
           <div :class="{'slActive':guideActive === i,hoverCls:hoverIdx===i}">
-            <img @click="gotoLight(item)" @mouseleave="hoverOutHandle(item,i)" @mouseenter="hoverHandle(item,i)" :src="item.thumbnail_signed_src" :alt="item.name" />
+            <img @click="gotoLight(item)" @mouseleave="hoverOutHandle(item,i)" @mouseenter="hoverHandle(item,i)" :src="(item.locations?item.locations[0].thumbnail_signed_src : item.thumbnail_signed_src)" :alt="item.name" />
             <span :title="item.name">{{item.name}}</span>
           </div>
         </swiper-slide>
@@ -160,6 +160,7 @@ export default {
     this.$nextTick(() => {
       window.addEventListener("loadfinish", () => {
         this.guide = window.player.model.images;
+        console.log(this.guide);
          //监听导览状态
           window.player.on('onplayStatus', (data)=>{
             this.guideActive = data.destinationItem && data.destinationItem[0]

+ 15 - 9
web/src/views/uploadflie/index.vue

@@ -100,15 +100,15 @@ export default {
   },
   methods:{
     async save(){
-      if (!this.desc) {
+      if (!String(this.desc).trim()) {
         return this.$showAlert({
-                    tips:'请填写史料说明'
-                })
+            tips:'请填写史料说明'
+        })
       }
       let params = {
-          "code": this.fileCode,
-          "description": this.desc,
-          "phone": this.contact
+          "code": this.fileList.length>0?this.fileCode:'',
+          "description": String(this.desc).trim(),
+          "phone": this.contact.trim()
       }
 
       let result = await this.$http({
@@ -138,7 +138,6 @@ export default {
       }
       this.fileList.splice(i,1);
 
-// /api/web/material/delete
     },
     onFileChange(data) {
       if (this.fileList.length>4) {
@@ -147,7 +146,6 @@ export default {
         })
       }
       
-      console.log(data);
       let tmp = {
         id:'_' + this.$randomWord(false,8,8),
         file:data.files[0],
@@ -155,12 +153,20 @@ export default {
         name:data.files[0].name,
         img:window.URL.createObjectURL(data.files[0])
       }
+
+      let flag = this.fileList.findIndex(item=>{
+        return data.files[0].name == item.name
+      })
       
+      if (flag>-1) {
+        return this.$showAlert({
+            tips:'无法上传同名文件,请重新选择'
+        })
+      }
 
       http.uploadFile(`${this.$serverName}/api/web/material/upload/${this.fileCode}`, tmp, (res)=>{
         tmp.path = res.data.path
         this.fileList.push(tmp)
-        console.log(this.fileList,res);
       }, err=>{
         console.log(err);
       },progress=>{