|
@@ -505,6 +505,20 @@ export default {
|
|
|
this.getDoctorRank();
|
|
|
this.getFieldList();
|
|
|
},
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+
|
|
|
+ next(vm => {
|
|
|
+ // 回到原来的位置
|
|
|
+ const position = JSON.parse(window.sessionStorage.getItem('position'))
|
|
|
+ document.querySelector('.app-wrapper').scrollTop = position
|
|
|
+ })
|
|
|
+ },
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
+ // 保存离开页面时的位置
|
|
|
+ const position = document.querySelector('.app-wrapper').scrollTop
|
|
|
+ window.sessionStorage.setItem('position', JSON.stringify(position))
|
|
|
+ next()
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 获取缺陷字段选项
|
|
|
getFieldList() {
|