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