Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fukai
vue-gjjs
Commits
32828340
Commit
32828340
authored
Dec 23, 2021
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
针对顶层入口添加处理
parent
8b98c1a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
commonGlobalSearch.js
src/mixin/commonGlobalSearch.js
+56
-0
No files found.
src/mixin/commonGlobalSearch.js
0 → 100644
View file @
32828340
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
)
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment