Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3fd02a18
authored
Nov 12, 2020
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
improve menu
1 parent
098fd495
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
15 deletions
src/main.js
src/views/dictionaryManage/dictionaryData/index.vue
src/views/dictionaryManage/index.vue
src/main.js
View file @
3fd02a1
...
...
@@ -40,7 +40,7 @@ function render({ data = {} , container } = {}) {
render
:
h
=>
h
(
App
),
}).
$mount
(
container
?
container
.
querySelector
(
'#glsx-sub-system'
)
:
'#glsx-sub-system'
);
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
const
metaTitle
=
to
.
meta
.
title
;
if
(
metaTitle
)
{
const
thisBreadCrumb
=
data
.
store
.
getters
.
curBreadCrumb
;
...
...
src/views/dictionaryManage/dictionaryData/index.vue
View file @
3fd02a1
...
...
@@ -86,6 +86,7 @@ export default {
data
()
{
return
{
DICTSTATUS
:
this
.
$Constants
.
DICT_STATUS
,
storageParams
:
{},
searchForm
:
{
name
:
''
},
...
...
@@ -198,28 +199,58 @@ export default {
}
},
mounted
()
{
this
.
searchForm
.
name
=
this
.
$route
.
params
.
row
.
dictName
this
.
dictDataForm
.
dictType
=
this
.
$route
.
params
.
row
.
dictType
this
.
dictDataForm
.
enableStatus
=
this
.
$route
.
params
.
row
.
enableStatus
let
params
=
this
.
$route
.
params
;
if
((
JSON
.
stringify
(
params
)
===
'{}'
||
!
params
))
{
params
=
this
.
getInitStorage
();
this
.
storageParams
=
params
;
}
if
(
params
)
{
this
.
searchForm
.
name
=
params
.
row
.
dictName
this
.
dictDataForm
.
dictType
=
params
.
row
.
dictType
this
.
dictDataForm
.
enableStatus
=
params
.
row
.
enableStatus
}
},
methods
:
{
getInitStorage
()
{
const
getStorageParams
=
localStorage
.
getItem
(
'dictionaryParams'
);
if
(
getStorageParams
)
{
return
JSON
.
parse
(
getStorageParams
);
}
else
{
return
''
;
}
},
// 重置搜索条件
refresh
()
{
let
name
=
''
;
if
(
this
.
$route
.
params
.
row
)
{
name
=
this
.
$route
.
params
.
row
.
dictName
;
}
else
if
(
this
.
storageParams
.
row
)
{
name
=
this
.
storageParams
.
row
.
dictName
;
}
this
.
searchForm
=
{
name
:
this
.
$route
.
params
.
row
.
dictName
name
}
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchForm
.
type
=
this
.
$route
.
params
.
row
.
dictType
if
(
this
.
searchForm
.
daterange
)
{
this
.
searchForm
.
sDate
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchForm
.
eDate
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchForm
.
daterange
}
else
{
if
(
this
.
searchForm
.
sDate
)
delete
this
.
searchForm
.
sDate
&&
delete
this
.
searchForm
.
eDate
}
resolve
()
let
getDictType
=
''
;
setTimeout
(()
=>
{
if
(
this
.
$route
.
params
.
row
)
{
getDictType
=
this
.
$route
.
params
.
row
.
dictType
;
}
else
if
(
this
.
storageParams
.
row
)
{
getDictType
=
this
.
storageParams
.
row
.
dictType
;
}
this
.
searchForm
.
type
=
getDictType
;
if
(
this
.
searchForm
.
daterange
)
{
this
.
searchForm
.
sDate
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchForm
.
eDate
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchForm
.
daterange
}
else
{
if
(
this
.
searchForm
.
sDate
)
delete
this
.
searchForm
.
sDate
&&
delete
this
.
searchForm
.
eDate
}
resolve
()
},
100
)
})
},
// 确定
...
...
src/views/dictionaryManage/index.vue
View file @
3fd02a1
...
...
@@ -277,7 +277,7 @@ export default {
case
'list'
:
console
.
log
(
'list'
,
scope
)
const
listData
=
{
row
:
scope
};
localStorage
.
setItem
(
'dictionaryParams'
,
listData
);
localStorage
.
setItem
(
'dictionaryParams'
,
JSON
.
stringify
(
listData
)
);
this
.
$router
.
push
({
name
:
'dictionaryData'
,
params
:
listData
});
break
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment