Browse Source

no message

see999 4 years ago
parent
commit
d13c57d44d
3 changed files with 33 additions and 2 deletions
  1. 6 1
      src/App.vue
  2. 13 0
      src/xt_pages/sign/lineUp.vue
  3. 14 1
      src/xt_pages/sign/signIn.vue

+ 6 - 1
src/App.vue View File

9
 import { getOrgs, changeOrg } from "@/api/config";
9
 import { getOrgs, changeOrg } from "@/api/config";
10
 export default {
10
 export default {
11
   name: "App",
11
   name: "App",
12
+  provide() {
13
+    return {
14
+      reload: this.reload
15
+    };
16
+  },
12
   data () {
17
   data () {
13
     return {
18
     return {
14
       isRouterAlive: true,
19
       isRouterAlive: true,
19
   },
24
   },
20
 
25
 
21
   created(){
26
   created(){
22
-    
27
+
23
     // getOrgs().then(response => {
28
     // getOrgs().then(response => {
24
     //   if (response.data.state === 1) {
29
     //   if (response.data.state === 1) {
25
     //     var creator = response.data.data.creator;
30
     //     var creator = response.data.data.creator;

+ 13 - 0
src/xt_pages/sign/lineUp.vue View File

213
     components:{
213
     components:{
214
         BreadCrumb
214
         BreadCrumb
215
     },
215
     },
216
+    inject: ['reload'],
216
     data(){
217
     data(){
217
         return{
218
         return{
218
             crumbs: [
219
             crumbs: [
240
 
241
 
241
             voice:true,
242
             voice:true,
242
             a:1,
243
             a:1,
244
+            newTimes:null
243
             
245
             
244
         }
246
         }
245
     },
247
     },
249
         },
251
         },
250
     },
252
     },
251
     created(){
253
     created(){
254
+        if(sessionStorage.getItem('lineUpKey') != null){
255
+            if(sessionStorage.getItem('lineUpKey') == 1){
256
+                this.dialogTableVisible = true
257
+            }
258
+        }
252
         this.initData = {
259
         this.initData = {
253
             cmd: "queue/join",
260
             cmd: "queue/join",
254
             data: {type:2,page:1,size:6},
261
             data: {type:2,page:1,size:6},
318
         this.timerID = setInterval(() => {
325
         this.timerID = setInterval(() => {
319
             this.updateTime()
326
             this.updateTime()
320
         }, 1000);
327
         }, 1000);
328
+        this.newTimes = setInterval(() => {
329
+            this.reload()
330
+        }, 1000 * 60 * 30);
321
     },
331
     },
322
     beforeDestroy(){
332
     beforeDestroy(){
323
         clearInterval(this.timer);  // 清除定时器
333
         clearInterval(this.timer);  // 清除定时器
324
         this.timer = null
334
         this.timer = null
325
         clearInterval(this.timerID);
335
         clearInterval(this.timerID);
326
         this.timerID = null;  // 清除定时器
336
         this.timerID = null;  // 清除定时器
337
+        clearInterval(this.newTimes);  // 清除定时器
338
+        this.newTimes = null
327
         let unObj = {
339
         let unObj = {
328
             cmd:'queue/unjoin',
340
             cmd:'queue/unjoin',
329
             data:{type:2}
341
             data:{type:2}
453
             return (zero + num).slice(-digit);
465
             return (zero + num).slice(-digit);
454
         },
466
         },
455
         fullscreenboard: function() {
467
         fullscreenboard: function() {
468
+            sessionStorage.setItem('lineUpKey',1);
456
             this.dialogTableVisible = true;
469
             this.dialogTableVisible = true;
457
             // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
470
             // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
458
             // window.open(routeData.href, '_blank')
471
             // window.open(routeData.href, '_blank')

+ 14 - 1
src/xt_pages/sign/signIn.vue View File

131
     components:{
131
     components:{
132
         BreadCrumb
132
         BreadCrumb
133
     },
133
     },
134
+    inject: ['reload'],
134
     data(){
135
     data(){
135
         return{
136
         return{
136
             crumbs: [
137
             crumbs: [
147
             timerID:null,
148
             timerID:null,
148
             time:'',
149
             time:'',
149
             newdate:'',
150
             newdate:'',
150
-            ds:null
151
+            ds:null,
152
+            newTimes:null
151
         }
153
         }
152
     },
154
     },
153
     computed: {
155
     computed: {
156
         },
158
         },
157
     },
159
     },
158
     created(){
160
     created(){
161
+        if(sessionStorage.getItem('signInKey') != null){
162
+            if(sessionStorage.getItem('signInKey') == 1){
163
+                this.dialogTableVisible = true
164
+            }
165
+        }
159
         this.initData = {
166
         this.initData = {
160
             cmd: "queue/join",
167
             cmd: "queue/join",
161
             data: {type:1,page:1,size:10},
168
             data: {type:1,page:1,size:10},
190
             this.updateTime()
197
             this.updateTime()
191
         }, 1000);
198
         }, 1000);
192
         // this.updateTime();
199
         // this.updateTime();
200
+        this.newTimes = setInterval(() => {
201
+            this.reload()
202
+        }, 1000 * 60 * 30);
193
     },
203
     },
194
     beforeDestroy(){
204
     beforeDestroy(){
195
         clearInterval(this.timer);  // 清除定时器
205
         clearInterval(this.timer);  // 清除定时器
196
         clearInterval(this.timerID);  // 清除定时器
206
         clearInterval(this.timerID);  // 清除定时器
207
+        clearInterval(this.newTimes);  // 清除定时器
208
+        this.newTimes = null
197
         let obj = {
209
         let obj = {
198
             cmd: "queue/unjoin",
210
             cmd: "queue/unjoin",
199
             data: {type:1},
211
             data: {type:1},
268
             return (zero + num).slice(-digit);
280
             return (zero + num).slice(-digit);
269
         },
281
         },
270
         fullscreenboard: function() {
282
         fullscreenboard: function() {
283
+            sessionStorage.setItem('signInKey',1);
271
             this.dialogTableVisible = true;
284
             this.dialogTableVisible = true;
272
             // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
285
             // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
273
             // window.open(routeData.href, '_blank')
286
             // window.open(routeData.href, '_blank')