Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
杨硕
template_vue
Commits
76ffe650
Commit
76ffe650
authored
Dec 17, 2023
by
高宇
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3.切换页面前,保留查询条件
parent
22147c5a
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
135 additions
and
83 deletions
+135
-83
draw.vue
src/views/equipment/draw.vue
+15
-11
index.vue
src/views/equipment/equipmentCheck/index.vue
+15
-11
index.vue
src/views/equipment/inventoryRecord/index.vue
+7
-10
index.vue
src/views/equipment/printingCheck/index.vue
+15
-6
draw.vue
src/views/processManagement/draw.vue
+4
-6
index.vue
src/views/processManagement/inventoryQuery/index.vue
+4
-6
index.vue
src/views/processManagement/inventoryRecord/index.vue
+7
-11
index.vue
src/views/processManagement/processesCheck/index.vue
+14
-10
index.vue
src/views/sample/basicInformation/index.vue
+8
-0
index.vue
src/views/sample/correctionLibrary/index.vue
+8
-0
index.vue
src/views/sample/errorRecord/index.vue
+15
-6
index.vue
src/views/sample/inventoryRecord/index.vue
+15
-6
index.vue
src/views/sample/sampleType/index.vue
+8
-0
No files found.
src/views/equipment/draw.vue
View file @
76ffe650
...
@@ -493,15 +493,19 @@ export default {
...
@@ -493,15 +493,19 @@ export default {
}
,
}
,
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'equipmentParams'
,
JSON
.
stringify
(
this
.
queryParams
))
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
}
)
next
()
next
()
// this.$store.dispatch('searchSave/searchParamsSet',
{
// path: this.$route.path,
// param:
{
// ...this.queryParams
//
}
//
}
)
}
,
}
,
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'equipmentParams'
))
{
this
.
queryParams
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'equipmentParams'
))
}
this
.
getDict
()
this
.
getDict
()
this
.
getList
()
this
.
getList
()
this
.
getCodeDict
()
this
.
getCodeDict
()
...
...
src/views/equipment/equipmentCheck/index.vue
View file @
76ffe650
...
@@ -212,20 +212,23 @@ export default {
...
@@ -212,20 +212,23 @@ export default {
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'twoRecord'
,
JSON
.
stringify
(
this
.
queryEntity
))
path
:
this
.
$route
.
path
,
sessionStorage
.
setItem
(
'twoDateRange'
,
JSON
.
stringify
(
this
.
dateRange
))
param
:
{
...
this
.
queryParams
}
})
next
()
next
()
},
},
created
()
{
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
if
(
sessionStorage
.
getItem
(
'twoRecord'
))
{
const
{
searchParams
}
=
this
.
$store
.
getters
this
.
queryEntity
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'twoRecord'
))
const
{
path
}
=
this
.
$route
}
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
if
(
sessionStorage
.
getItem
(
'twoDateRange'
))
{
this
.
queryParams
=
{
...
param
}
this
.
dateRange
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'twoDateRange'
))
if
(
this
.
dateRange
!==
null
)
{
this
.
queryParams
.
beginTime
=
this
.
dateRange
[
0
]
+
' 00:00:00'
this
.
queryParams
.
endTime
=
this
.
dateRange
[
1
]
+
' 23:59:00'
}
else
{
this
.
queryParams
.
beginTime
=
''
this
.
queryParams
.
endTime
=
''
}
}
}
this
.
getList
()
this
.
getList
()
},
},
...
@@ -259,6 +262,7 @@ export default {
...
@@ -259,6 +262,7 @@ export default {
if
(
this
.
queryParams
.
beginTime
===
''
||
this
.
queryParams
.
endTime
===
''
)
{
if
(
this
.
queryParams
.
beginTime
===
''
||
this
.
queryParams
.
endTime
===
''
)
{
this
.
dateRange
=
[]
this
.
dateRange
=
[]
}
}
console
.
log
(
'dateRange'
,
this
.
dateRange
)
listdevice
(
this
.
queryParams
,
this
.
addDateRange
(
this
.
queryEntity
,
this
.
dateRange
)).
then
(
response
=>
{
listdevice
(
this
.
queryParams
,
this
.
addDateRange
(
this
.
queryEntity
,
this
.
dateRange
)).
then
(
response
=>
{
// console.log('list', response)
// console.log('list', response)
this
.
equipmentList
=
response
.
rows
this
.
equipmentList
=
response
.
rows
...
...
src/views/equipment/inventoryRecord/index.vue
View file @
76ffe650
...
@@ -442,19 +442,16 @@ export default {
...
@@ -442,19 +442,16 @@ export default {
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'oneRecord'
,
JSON
.
stringify
(
this
.
queryEntity
))
path
:
this
.
$route
.
path
,
sessionStorage
.
setItem
(
'oneDateRange'
,
JSON
.
stringify
(
this
.
dateRange
))
param
:
{
...
this
.
queryParams
}
})
next
()
next
()
},
},
created
()
{
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
if
(
sessionStorage
.
getItem
(
'oneRecord'
))
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
this
.
queryEntity
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'oneRecord'
))
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
}
this
.
queryParams
=
{
...
param
}
if
(
sessionStorage
.
getItem
(
'oneDateRange'
))
{
this
.
dateRange
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'oneDateRange'
))
}
}
this
.
getList
()
this
.
getList
()
this
.
getDict
()
this
.
getDict
()
...
...
src/views/equipment/printingCheck/index.vue
View file @
76ffe650
...
@@ -421,15 +421,24 @@ export default {
...
@@ -421,15 +421,24 @@ export default {
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'threeRecord'
,
JSON
.
stringify
(
this
.
queryEntity
))
path
:
this
.
$route
.
path
,
sessionStorage
.
setItem
(
'threeDateRange'
,
JSON
.
stringify
(
this
.
dateRange
))
param
:
{
...
this
.
queryParams
}
})
next
()
next
()
},
},
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'threeRecord'
))
{
this
.
queryEntity
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'threeRecord'
))
}
if
(
sessionStorage
.
getItem
(
'threeDateRange'
))
{
this
.
dateRange
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'threeDateRange'
))
if
(
this
.
dateRange
!==
null
)
{
this
.
queryParams
.
beginTime
=
this
.
dateRange
[
0
]
+
' 00:00:00'
this
.
queryParams
.
endTime
=
this
.
dateRange
[
1
]
+
' 23:59:00'
}
else
{
this
.
queryParams
.
beginTime
=
''
this
.
queryParams
.
endTime
=
''
}
}
this
.
getUserName
()
this
.
getUserName
()
this
.
getYsList
()
this
.
getYsList
()
this
.
getDict
()
this
.
getDict
()
...
...
src/views/processManagement/draw.vue
View file @
76ffe650
...
@@ -545,15 +545,13 @@ export default {
...
@@ -545,15 +545,13 @@ export default {
}
,
}
,
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'fourParams'
,
JSON
.
stringify
(
this
.
queryParams
))
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
}
)
next
()
next
()
}
,
}
,
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'fourParams'
))
{
this
.
queryParams
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'fourParams'
))
}
this
.
getDict
()
this
.
getDict
()
this
.
getList
()
this
.
getList
()
}
,
}
,
...
...
src/views/processManagement/inventoryQuery/index.vue
View file @
76ffe650
...
@@ -572,15 +572,13 @@ export default {
...
@@ -572,15 +572,13 @@ export default {
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'sixParams'
,
JSON
.
stringify
(
this
.
queryParams
))
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
}
)
next
()
next
()
}
,
}
,
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'sixParams'
))
{
this
.
queryParams
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sixParams'
))
}
this
.
getDict
()
this
.
getDict
()
this
.
getList
()
this
.
getList
()
}
,
}
,
...
...
src/views/processManagement/inventoryRecord/index.vue
View file @
76ffe650
...
@@ -442,20 +442,16 @@ export default {
...
@@ -442,20 +442,16 @@ export default {
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'fiveRecord'
,
JSON
.
stringify
(
this
.
queryEntity
))
path
:
this
.
$route
.
path
,
sessionStorage
.
setItem
(
'fiveDateRange'
,
JSON
.
stringify
(
this
.
dateRange
))
param
:
{
...
this
.
queryParams
}
})
next
()
next
()
},
},
created
()
{
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
]
)
{
if
(
sessionStorage
.
getItem
(
'fiveRecord'
)
)
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
this
.
queryEntity
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'fiveRecord'
))
const
{
path
}
=
this
.
$route
}
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
if
(
sessionStorage
.
getItem
(
'fiveDateRange'
))
{
this
.
queryParams
=
{...
param
}
this
.
dateRange
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'fiveDateRange'
))
}
}
this
.
getList
()
this
.
getList
()
this
.
getDict
()
this
.
getDict
()
...
...
src/views/processManagement/processesCheck/index.vue
View file @
76ffe650
...
@@ -200,19 +200,23 @@ export default {
...
@@ -200,19 +200,23 @@ export default {
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'sevenRecord'
,
JSON
.
stringify
(
this
.
queryEntity
))
path
:
this
.
$route
.
path
,
sessionStorage
.
setItem
(
'sevenDateRange'
,
JSON
.
stringify
(
this
.
dateRange
))
param
:
{
...
this
.
queryParams
}
})
next
()
next
()
},
},
created
()
{
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
if
(
sessionStorage
.
getItem
(
'sevenRecord'
))
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
this
.
queryEntity
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sevenRecord'
))
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
}
this
.
queryParams
=
{
...
param
}
if
(
sessionStorage
.
getItem
(
'sevenDateRange'
))
{
this
.
dateRange
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sevenDateRange'
))
if
(
this
.
dateRange
!==
null
)
{
this
.
queryParams
.
beginTime
=
this
.
dateRange
[
0
]
+
' 00:00:00'
this
.
queryParams
.
endTime
=
this
.
dateRange
[
1
]
+
' 23:59:00'
}
else
{
this
.
queryParams
.
beginTime
=
''
this
.
queryParams
.
endTime
=
''
}
}
}
this
.
getList
()
this
.
getList
()
},
},
...
...
src/views/sample/basicInformation/index.vue
View file @
76ffe650
...
@@ -188,7 +188,15 @@ export default {
...
@@ -188,7 +188,15 @@ export default {
basicinfoMationList
:
[]
basicinfoMationList
:
[]
}
}
}
,
}
,
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
sessionStorage
.
setItem
(
'sampleOneParams'
,
JSON
.
stringify
(
this
.
queryParams
))
next
()
}
,
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'sampleOneParams'
))
{
this
.
queryParams
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sampleOneParams'
))
}
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
methods
:
{
...
...
src/views/sample/correctionLibrary/index.vue
View file @
76ffe650
...
@@ -170,7 +170,15 @@ export default {
...
@@ -170,7 +170,15 @@ export default {
basicinfoMationList
:
[]
basicinfoMationList
:
[]
}
}
}
,
}
,
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
sessionStorage
.
setItem
(
'sampleThreeParams'
,
JSON
.
stringify
(
this
.
queryParams
))
next
()
}
,
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'sampleThreeParams'
))
{
this
.
queryParams
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sampleThreeParams'
))
}
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
methods
:
{
...
...
src/views/sample/errorRecord/index.vue
View file @
76ffe650
...
@@ -311,15 +311,24 @@ export default {
...
@@ -311,15 +311,24 @@ export default {
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'sampleFiveRecord'
,
JSON
.
stringify
(
this
.
queryEntity
))
path
:
this
.
$route
.
path
,
sessionStorage
.
setItem
(
'sampleFiveDateRange'
,
JSON
.
stringify
(
this
.
dateRange
))
param
:
{
...
this
.
queryParams
}
})
next
()
next
()
},
},
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'sampleFiveRecord'
))
{
this
.
queryEntity
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sampleFiveRecord'
))
}
if
(
sessionStorage
.
getItem
(
'sampleFiveDateRange'
))
{
this
.
dateRange
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sampleFiveDateRange'
))
if
(
this
.
dateRange
!==
null
)
{
this
.
queryParams
.
beginTime
=
this
.
dateRange
[
0
]
+
' 00:00:00'
this
.
queryParams
.
endTime
=
this
.
dateRange
[
1
]
+
' 23:59:00'
}
else
{
this
.
queryParams
.
beginTime
=
''
this
.
queryParams
.
endTime
=
''
}
}
this
.
getList
()
this
.
getList
()
},
},
// 监听回车
// 监听回车
...
...
src/views/sample/inventoryRecord/index.vue
View file @
76ffe650
...
@@ -344,15 +344,24 @@ export default {
...
@@ -344,15 +344,24 @@ export default {
},
},
/** 路由离开前存储筛选条件*/
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
sessionStorage
.
setItem
(
'sampleFourRecord'
,
JSON
.
stringify
(
this
.
queryEntity
))
path
:
this
.
$route
.
path
,
sessionStorage
.
setItem
(
'sampleFourDateRange'
,
JSON
.
stringify
(
this
.
dateRange
))
param
:
{
...
this
.
queryParams
}
})
next
()
next
()
},
},
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'sampleFourRecord'
))
{
this
.
queryEntity
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sampleFourRecord'
))
}
if
(
sessionStorage
.
getItem
(
'sampleFourDateRange'
))
{
this
.
dateRange
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sampleFourDateRange'
))
if
(
this
.
dateRange
!==
null
)
{
this
.
queryParams
.
beginTime
=
this
.
dateRange
[
0
]
+
' 00:00:00'
this
.
queryParams
.
endTime
=
this
.
dateRange
[
1
]
+
' 23:59:00'
}
else
{
this
.
queryParams
.
beginTime
=
''
this
.
queryParams
.
endTime
=
''
}
}
this
.
getList
()
this
.
getList
()
},
},
// 监听回车
// 监听回车
...
...
src/views/sample/sampleType/index.vue
View file @
76ffe650
...
@@ -199,7 +199,15 @@ export default {
...
@@ -199,7 +199,15 @@ export default {
basicinfoMationList
:
[]
basicinfoMationList
:
[]
}
}
}
,
}
,
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
sessionStorage
.
setItem
(
'sampleTwoParams'
,
JSON
.
stringify
(
this
.
queryParams
))
next
()
}
,
created
()
{
created
()
{
if
(
sessionStorage
.
getItem
(
'sampleTwoParams'
))
{
this
.
queryParams
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'sampleTwoParams'
))
}
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
methods
:
{
...
...
高宇
@gaoyu
mentioned in commit
3c849371
·
Dec 18, 2023
mentioned in commit
3c849371
mentioned in commit 3c849371839985814eabacd07aabb1135e7c0a10
Toggle commit list
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