liuxiaona 2 years ago
parent
commit
dd2601b716

+ 6 - 0
.idea/workspace.xml

@@ -2,6 +2,9 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="ce8c7a71-f4a8-4b87-99a5-ff575adf9383" name="Changes" comment="">
5
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/project/src/components/smartRadar/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/smartRadar/index.vue" afterDir="false" />
5 8
       <change beforePath="$PROJECT_DIR$/qwh5/dist/css/app.a87a1682.css" beforeDir="false" />
6 9
       <change beforePath="$PROJECT_DIR$/qwh5/dist/css/app.f42f36eb.css" beforeDir="false" />
7 10
       <change beforePath="$PROJECT_DIR$/qwh5/dist/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/qwh5/dist/index.html" afterDir="false" />
@@ -25,6 +28,9 @@
25 28
       <change beforePath="$PROJECT_DIR$/qwh5/src/views/HomeView.vue" beforeDir="false" afterPath="$PROJECT_DIR$/qwh5/src/views/HomeView.vue" afterDir="false" />
26 29
       <change beforePath="$PROJECT_DIR$/qwh5/src/views/radar.vue" beforeDir="false" afterPath="$PROJECT_DIR$/qwh5/src/views/radar.vue" afterDir="false" />
27 30
       <change beforePath="$PROJECT_DIR$/qwh5/src/views/radarH5.vue" beforeDir="false" afterPath="$PROJECT_DIR$/qwh5/src/views/radarH5.vue" afterDir="false" />
31
+      <change beforePath="$PROJECT_DIR$/static/css/app.aa71e5d030118618236a9048e5d64fec.css" beforeDir="false" />
32
+      <change beforePath="$PROJECT_DIR$/static/js/24.33f6d43fa68aa787a9f2.js" beforeDir="false" />
33
+      <change beforePath="$PROJECT_DIR$/static/js/manifest.d29597f98db51382d8e5.js" beforeDir="false" />
28 34
     </list>
29 35
     <option name="SHOW_DIALOG" value="false" />
30 36
     <option name="HIGHLIGHT_CONFLICTS" value="true" />

+ 1 - 1
index.html

@@ -7,4 +7,4 @@
7 7
         hm.src = "https://hm.baidu.com/hm.js?d61b9e2caf4d46ccda7471b5385e2333";
8 8
         var s = document.getElementsByTagName("script")[0];
9 9
         s.parentNode.insertBefore(hm, s);
10
-      })();</script><link href=./static/css/app.aa71e5d030118618236a9048e5d64fec.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.d29597f98db51382d8e5.js></script><script type=text/javascript src=./static/js/app.4cb6aabc6deefd275e53.js></script></body></html>
10
+      })();</script><link href=./static/css/app.57eaefbd3c5da4710e85880aca27c2ac.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.2a01e33126b49011e998.js></script><script type=text/javascript src=./static/js/app.4cb6aabc6deefd275e53.js></script></body></html>

+ 26 - 1
project/src/components/smartRadar/index.vue

@@ -2,6 +2,7 @@
2 2
   <div class="con">
3 3
     <div class="searchBox">
4 4
       <el-button type="primary" size="mini" @click="created_radar">新建智能雷达</el-button>
5
+      <el-button type="primary" size="mini" @click="copy">复制链接</el-button>
5 6
       <self-input :reset="reset" label_name="搜索雷达" @inputChange='(val)=>{radar_val = val;initFlag=!initFlag}'></self-input>
6 7
       <div class="reset" @click="resetEvent">重置</div>
7 8
     </div>
@@ -48,7 +49,31 @@ export default {
48 49
     },
49 50
     created_radar(){//新建
50 51
       this.$router.push({path:'/createRadar'})
51
-    }
52
+    },
53
+    copy() {
54
+      let corpid = '';
55
+      if (sessionStorage.getItem('company_session_defaultCorp') && sessionStorage.getItem('company_session_defaultCorp') != 'undefined') {
56
+        corpid = JSON.parse(sessionStorage.getItem('company_session_defaultCorp')).corpid
57
+      } else {
58
+        corpid = this.$localSelfStore.getLocal('defaultCorp') && this.$localSelfStore.getLocal('defaultCorp') != 'undefined' ? JSON.parse(this.$localSelfStore.getLocal('defaultCorp')).corpid : ''
59
+      }
60
+      let copyContent = `http://${window.location.host}/playlet/qwh5/dist/index.html#/radarH5?corpid=${corpid}`
61
+      // 1. 创建并添加一个输入框元素(最后会销毁)
62
+      const textareaEle = document.createElement("textarea");
63
+      document.body.appendChild(textareaEle);
64
+      // 2. 将需要复制的文本传入输入框, 并调用 select 方法, 选中输入框中文本
65
+      textareaEle.value = copyContent;
66
+      textareaEle.select();
67
+      textareaEle.readOnly = 'readOnly';
68
+      // 3. 调用复制选中文本的方法
69
+      document.execCommand('copy');
70
+      // 4. 销毁输入框
71
+      document.body.removeChild(textareaEle);
72
+      this.$message({
73
+        message: '复制成功',
74
+        type: "success"
75
+      })
76
+    },
52 77
   }
53 78
 }
54 79
 </script>

File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/css/app.93d49ba2.css


File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/index.html


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/js/app.13fdae3c.js


File diff suppressed because it is too large
+ 0 - 1
qwh5/dist/js/app.3c9d653c.js


+ 3 - 15
qwh5/src/views/radar.vue

@@ -28,7 +28,6 @@ import { useStore } from "vuex";
28 28
 import { uuid } from 'vue-uuid';
29 29
 import { Overlay } from 'vant';
30 30
 import { getQueryString } from '@/utils/common'
31
-import getWxConfig from "@/utils/getWxConfig";
32 31
 export default defineComponent({
33 32
   components: {
34 33
     [Overlay .name]: Overlay ,
@@ -63,20 +62,9 @@ export default defineComponent({
63 62
       document.removeEventListener('visibilitychange', handleVisiable)
64 63
       // behaviorReport(2,$store.state.enterUUID)
65 64
     })
66
-    function handleVisiable (e) {
67
-      switch(e.target.visibilityState) {
68
-        case 'prerender':
69
-          console.log('网页预渲染,内容不可见')
70
-          break;
71
-        case 'hidden':
72
-          console.log('内容不可见,处理后台、最小化、锁屏状态')
73
-          alert('警告!你已经离开当前答题页面');
74
-          behaviorReport(2,$store.state.enterUUID)
75
-          break;
76
-        case 'visible':
77
-          console.log('处于正常打开')
78
-          alert('处于正常打开')
79
-          break;
65
+    function handleVisiable () {
66
+      if (document.visibilityState === 'hidden') {
67
+        behaviorReport(2,$store.state.enterUUID)
80 68
       }
81 69
     }
82 70
 

File diff suppressed because it is too large
+ 1 - 1
static/css/app.aa71e5d030118618236a9048e5d64fec.css


File diff suppressed because it is too large
+ 0 - 1
static/js/24.33f6d43fa68aa787a9f2.js


File diff suppressed because it is too large
+ 1 - 0
static/js/24.b5d3f0aa63327bfd257e.js


File diff suppressed because it is too large
+ 1 - 1
static/js/manifest.d29597f98db51382d8e5.js