优化
This commit is contained in:
parent
88a6c22910
commit
0ec6168a4a
@ -110,3 +110,14 @@ export function loadingClose () {
|
||||
this.$loading.service(opt).close()
|
||||
}, 100)
|
||||
}
|
||||
|
||||
export function getUrlParams () {
|
||||
var query = decodeURI(window.location.search.substring(1))
|
||||
var vars = query.split('&')
|
||||
const obj = {}
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split('=')
|
||||
obj[pair[0]] = pair[1]
|
||||
}
|
||||
return obj
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ import report from './report'
|
||||
import tableItem from '../todo/tableItem'
|
||||
import { apiGetWaitList } from '@/api/toDo'
|
||||
import performance from '../../assessment/performance'
|
||||
|
||||
import { getUrlParams } from '@/utils/common'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@ -62,9 +62,9 @@ export default {
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
let search = window.location.search
|
||||
if (search) {
|
||||
const item = this.list.filter(i => '?' + i.tag === search.split('=')[0])
|
||||
let obj = getUrlParams()
|
||||
if (obj.id) {
|
||||
const item = this.list.filter(i => obj[i.tag])
|
||||
if (item.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$router.replace({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user