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
import Api from "../service/Api";
//对sel系列交易做全局处理
const trns = {
did:"ditsel",
lid:"litsel",
cpd:"cptsel",
ded:"detsel",
led:"letsel",
bpd:"bptsel",
ccd:"cctsel",
ged:"getsel",
gid:"gitsel",
mcd:"mctsel",
trd:"trtsel"
}
export default {
mounted() {
if(!this.trnName){
//非顶级vue实例,不需要执行
return;
}
if(!this.isTrnSupport()){
return
}
setTimeout(()=>{
this.dealGlobalSearch()
},50)
},
methods:{
async dealGlobalSearch(){
let params = this.$route.query
if(!(params && params.ownref && params.objtyp)){
return
}
let ownref = params.ownref;
let ownrefPath = params.objtyp+"grp.rec.ownref"
let rtnmsg = await this.executeRule(ownrefPath,undefined,()=>{
this.model[params.objtyp+"grp"].rec.ownref=ownref
})
if(rtnmsg.respCode == SUCCESS)
{
this.updateModel(rtnmsg.data)
}
},
isTrnSupport(){
let trnName = this.declareParams.trnName
return Object.values(trns).includes(trnName)
}
}
}