添加百问百答
This commit is contained in:
		
							parent
							
								
									a50d97cf98
								
							
						
					
					
						commit
						0a2fc2b737
					
				| 
						 | 
					@ -3,8 +3,8 @@ ENV = 'development'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# base api
 | 
					# base api
 | 
				
			||||||
#VUE_APP_BASE_API = 'http://10.0.11.127:8000/api'
 | 
					#VUE_APP_BASE_API = 'http://10.0.11.127:8000/api'
 | 
				
			||||||
VUE_APP_BASE_API = 'http://127.0.0.1:2222/api'
 | 
					# VUE_APP_BASE_API = 'http://127.0.0.1:2222/api'
 | 
				
			||||||
# VUE_APP_BASE_API = 'https://testsearch.ctc.ac.cn/api'
 | 
					VUE_APP_BASE_API = 'https://testsearch.ctc.ac.cn/api'
 | 
				
			||||||
                     
 | 
					                     
 | 
				
			||||||
#VUE_APP_BASE_API = 'http://47.95.0.242:9101/api'
 | 
					#VUE_APP_BASE_API = 'http://47.95.0.242:9101/api'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,6 +27,7 @@
 | 
				
			||||||
    "path-to-regexp": "2.4.0",
 | 
					    "path-to-regexp": "2.4.0",
 | 
				
			||||||
    "vod-js-sdk-v6": "^1.4.12",
 | 
					    "vod-js-sdk-v6": "^1.4.12",
 | 
				
			||||||
    "vue": "2.6.10",
 | 
					    "vue": "2.6.10",
 | 
				
			||||||
 | 
					    "vue-pdf": "^4.2.0",
 | 
				
			||||||
    "vue-router": "3.0.6",
 | 
					    "vue-router": "3.0.6",
 | 
				
			||||||
    "vuex": "3.1.0",
 | 
					    "vuex": "3.1.0",
 | 
				
			||||||
    "xlsx": "^0.15.5"
 | 
					    "xlsx": "^0.15.5"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 23 KiB  | 
| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1682056449970" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3554" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M468.053333 252.586667L342.186667 104.106667H199.253333l125.866667 148.053333h142.933333z m370.773334 0l-125.866667-148.053334h-142.933333l126.293333 148.053334h142.506667z m-185.173334 0l-125.866666-148.053334H384.853333l125.866667 148.053334h142.933333z m238.933334-148.48h-136.96l126.293333 148.053333h66.56V160c-0.426667-31.573333-24.32-55.893333-55.893333-55.893333z m-736 0h-5.546667c-31.573333 0-55.466667 23.893333-55.466667 55.466666v92.586667h187.306667L156.586667 104.106667zM95.573333 864c0 31.573333 23.893333 55.466667 55.466667 55.466667h741.546667c31.573333 0 55.466667-23.893333 55.466666-55.466667V289.706667H95.573333v574.293333zM392.106667 456.533333c0-31.573333 26.026667-46.506667 55.466666-46.506666 9.386667 0 20.48 1.706667 29.866667 7.253333l211.2 122.453333c25.6 13.653333 35.413333 45.226667 21.76 70.826667-4.693333 9.386667-12.373333 16.64-21.76 21.76l-211.2 122.453333c-9.386667 5.546667-18.346667 7.253333-29.866667 7.253334-29.866667 0-55.466667-14.933333-55.466666-46.506667V456.533333z" fill="#ffffff" p-id="3555" data-spm-anchor-id="a313x.7781069.0.i0" class="selected"></path></svg>
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
						 | 
					@ -42,6 +42,17 @@ export const constantRoutes = [
 | 
				
			||||||
      meta: { title: '首页', icon: 'dashboard' }
 | 
					      meta: { title: '首页', icon: 'dashboard' }
 | 
				
			||||||
    }]
 | 
					    }]
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    path: '/',
 | 
				
			||||||
 | 
					    component: Layout,
 | 
				
			||||||
 | 
					    redirect: '/baiwen',
 | 
				
			||||||
 | 
					    children: [{
 | 
				
			||||||
 | 
					      path: 'baiwen',
 | 
				
			||||||
 | 
					      name: 'baiwen',
 | 
				
			||||||
 | 
					      component: () => import('@/views/PT/baiwen'),
 | 
				
			||||||
 | 
					      meta: { title: '百问百答', icon: 'pdf' }
 | 
				
			||||||
 | 
					    }]
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    path: '/login',
 | 
					    path: '/login',
 | 
				
			||||||
    component: () => import('@/views/login/index'),
 | 
					    component: () => import('@/views/login/index'),
 | 
				
			||||||
| 
						 | 
					@ -192,7 +203,7 @@ export const asyncRoutes = [
 | 
				
			||||||
    component: Layout,
 | 
					    component: Layout,
 | 
				
			||||||
    redirect: '/supervision/task',
 | 
					    redirect: '/supervision/task',
 | 
				
			||||||
    name: 'Supervision',
 | 
					    name: 'Supervision',
 | 
				
			||||||
    meta: { title: '日常监督', icon: 'guide', perms: ['supervision'] },
 | 
					    meta: { title: '日常监督', icon: 'table', perms: ['supervision'] },
 | 
				
			||||||
    alwaysShow: true,
 | 
					    alwaysShow: true,
 | 
				
			||||||
    children: [
 | 
					    children: [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
| 
						 | 
					@ -228,6 +239,7 @@ export const asyncRoutes = [
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    path: '/qualityinspect',
 | 
					    path: '/qualityinspect',
 | 
				
			||||||
    component: Layout,
 | 
					    component: Layout,
 | 
				
			||||||
| 
						 | 
					@ -284,7 +296,7 @@ export const asyncRoutes = [
 | 
				
			||||||
    component: Layout,
 | 
					    component: Layout,
 | 
				
			||||||
    redirect: '/test/',
 | 
					    redirect: '/test/',
 | 
				
			||||||
    name: 'TestVideo',
 | 
					    name: 'TestVideo',
 | 
				
			||||||
    meta: { title: '视频培训', icon: 'guide', perms: ['video_views'] },
 | 
					    meta: { title: '视频培训', icon: 'video', perms: ['video_views'] },
 | 
				
			||||||
    alwaysShow: true,
 | 
					    alwaysShow: true,
 | 
				
			||||||
    children: [
 | 
					    children: [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,106 @@
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					    <div style="height:95vh" class="iframess"  @contextmenu.prevent.capture>
 | 
				
			||||||
 | 
					        <div style="position: fixed;width: 10vw;height:5vh;background:#ffffff;right: 1vw;">
 | 
				
			||||||
 | 
					            <img src="./../../assets/pdfLogo.png" style="width:100%;height: 100%;">
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        <iframe id="mainFrame" src="/baiwen.pdf" style="z-index: -6;" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import pdf from 'vue-pdf'
 | 
				
			||||||
 | 
					export default {  
 | 
				
			||||||
 | 
					    name: 'Pdf',
 | 
				
			||||||
 | 
					    components: {
 | 
				
			||||||
 | 
					        pdf
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    data() {
 | 
				
			||||||
 | 
					        return {
 | 
				
			||||||
 | 
					            url:'/baiwen.pdf',
 | 
				
			||||||
 | 
					            pageNum:1,
 | 
				
			||||||
 | 
					            pageTotalNum: 101, // pdf 总页数
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    created () {
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					            document.addEventListener('contextmenu', event => event.preventDefault());
 | 
				
			||||||
 | 
					            // 禁用右键
 | 
				
			||||||
 | 
					            document.oncontextmenu = new Function('event.returnValue=false')
 | 
				
			||||||
 | 
					            // 禁用选择
 | 
				
			||||||
 | 
					            document.onselectstart = new Function('event.returnValue=false')
 | 
				
			||||||
 | 
					            //禁止f12
 | 
				
			||||||
 | 
					            document.οnkeydοwn = new Function('event.returnValue=false')
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        // 如禁止f12 代码没生效,加下面这段
 | 
				
			||||||
 | 
					        document.onkeydown = function (e) {
 | 
				
			||||||
 | 
					            if (e && e.keyCode === 123) {
 | 
				
			||||||
 | 
					                e.returnValue = false
 | 
				
			||||||
 | 
					                // e.keyCode = 0   //去掉也可以,如果要写,则需要setter + getter配合使用,不然则会报错
 | 
				
			||||||
 | 
					                return false
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    mounted() {
 | 
				
			||||||
 | 
					    //   let that = this;
 | 
				
			||||||
 | 
					    //   this.getNumPages()
 | 
				
			||||||
 | 
					    //   setTimeout(function(){
 | 
				
			||||||
 | 
					    //     document.addEventListener('contextmenu', event => event.preventDefault()); 
 | 
				
			||||||
 | 
					    //     that.prohibit();
 | 
				
			||||||
 | 
					    //   },2000)
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					    methods:{
 | 
				
			||||||
 | 
					        prohibit () {
 | 
				
			||||||
 | 
					            alert('00000000000000000')
 | 
				
			||||||
 | 
					            document.getElementById('mainFrame').οnlοad=function(){
 | 
				
			||||||
 | 
					                document.addEventListener('contextmenu', event => event.preventDefault());
 | 
				
			||||||
 | 
					                iframe.contentWindow.document.οncοntextmenu=new Function('event.returnValue=false');
 | 
				
			||||||
 | 
					                iframe.contentWindow.document.onselectstart=new Function('event.returnValue=false')
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            document.getElementById('mainFrame').onload = function(){
 | 
				
			||||||
 | 
					                document.getElementById('mainFrame').oncontextmenu.addEventListener('')
 | 
				
			||||||
 | 
					                document.getElementById('mainFrame').oncontextmenu = function () {
 | 
				
			||||||
 | 
					                return false
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					                window.document.getElementById('mainFrame').contentWindow.document.oncontextmenu  = function(){ 
 | 
				
			||||||
 | 
					                    alert('请不要点击鼠标右键!');
 | 
				
			||||||
 | 
					                    return false;
 | 
				
			||||||
 | 
					                    }  
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            document.getElementById('mainFrame').oncontextmenu = function () {
 | 
				
			||||||
 | 
					                return false
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            // console.log(document)
 | 
				
			||||||
 | 
					            document.oncontextmenu = function () {
 | 
				
			||||||
 | 
					                return false
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        prePage() {
 | 
				
			||||||
 | 
					            let page = this.pageNum
 | 
				
			||||||
 | 
					            page = page > 1 ? page - 1 : this.pageTotalNum
 | 
				
			||||||
 | 
					            this.pageNum = page
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					        // 下一页
 | 
				
			||||||
 | 
					        nextPage() {
 | 
				
			||||||
 | 
					            let page = this.pageNum
 | 
				
			||||||
 | 
					            page = page < this.pageTotalNum ? page + 1 : 1
 | 
				
			||||||
 | 
					            this.pageNum = page
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        getNumPages() {
 | 
				
			||||||
 | 
					            let loadingTask = pdf.createLoadingTask(this.url)
 | 
				
			||||||
 | 
					            loadingTask.promise.then(pdf => {
 | 
				
			||||||
 | 
					                this.pageTotalNum = pdf.numPages
 | 
				
			||||||
 | 
					            }).catch(err => {
 | 
				
			||||||
 | 
					                console.error('pdf 加载失败', err);
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style>
 | 
				
			||||||
 | 
					.iframess{
 | 
				
			||||||
 | 
					    opacity: 0.99;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
		Loading…
	
		Reference in New Issue