1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<template>
<div style="height:100%;padding:10px;">
<imgDeatailDialog
v-if="mode == 'view'"
:tradeCode="tradeCode"
:trnName="trnName"
:imginr="imginr"
:smhinr="smhinr"
:docid="docid"
:date="date"
:ip="ip"
:port="port"
:oper="oper"
:org="org"
optionType="2"
:scanType='scanType'
/>
<addBindDialog
v-if="mode == 'bind'"
:tradeCode="tradeCode"
:trnName="trnName"
:imginr="imginr"
:smhinr="smhinr"
:ip="ip"
:port="port"
:org="org"
:scanType='scanType'
/>
<webScan :scanType='scanType' v-if="mode == 'scan'" :ip="ip" :port="port" :org="org"/>
</div>
</template>
<script>
import { getIpAndPort } from "~/service/business/common";
import imgDeatailDialog from "./imgDeatailDialog.vue";
import addBindDialog from "./addBindDialog.vue";
import webScan from "./scan.vue";
import { debug } from 'util';
export default {
components:{
imgDeatailDialog,
addBindDialog,
webScan
},
data(){
return {
SUCCESS:"AAAAAA",
isOpen: true,
mode:"scan",
scanType:'old',
ip:"",
port:"",
title:{
scan:"影像批扫",
view:"影像查看",
bind:"影像绑定"
},
tradeCode:"",
docid:"",
date:"",
imginr:"",
trnName:"",
org:"",
oper:""
}
},
created(){
let token = this.getParamOfURL("token");
let orgId = this.getParamOfURL("orgId");
let userName = this.getParamOfURL("userName");
if (token) {
sessionStorage.setItem("j_session_id",token);
}
sessionStorage.setItem("currentOrg",JSON.stringify({id:orgId}));
sessionStorage.setItem("userName",userName);
this.init();
//window.document.title = "影像"
console.log("created win",`${this.ip}+${this.port}+${this.docid}+${this.mode}+time:${this.date}`)
},
methods:{
init(){
this.mode = this.getParamOfURL("mode");
this.ip = this.getParamOfURL("ip");
this.port = this.getParamOfURL("port");
this.tradeCode = this.getParamOfURL("tradeCode");
this.docid = this.getParamOfURL("docid");
this.date = this.getParamOfURL("date");
this.trnName = this.getParamOfURL("trnName");
this.imginr = this.getParamOfURL("imginr");
this.smhinr = this.getParamOfURL("smhinr");
this.org = this.getParamOfURL("org");
this.oper = this.getParamOfURL("oper");
},
getParamOfURL(key){
let paramStr = window.location.href.split("?")[1];
if(!paramStr) return;
let keys = paramStr.split("&");
let obj = {};
for(let i=0;i<keys.length;i++){
let item = keys[i].split("=");
obj[item[0]] = item[1]
}
return obj[key]||""
},
}
}
</script>