修改传参方式

This commit is contained in:
huichao
2020-07-26 11:59:52 +08:00
parent 2b080c78c7
commit 1afb2372be
5 changed files with 64 additions and 55 deletions

View File

@@ -29,8 +29,8 @@
</div>
<div class="c-gray-base fs13 ml25 mt10" v-if="mask=='1'">
所在机构
<span v-if="Name!==''">{{Name}}></span>
<span class="red">{{unitName}}</span>
<span v-if="buName!==undefined">{{buName}}></span>
<span class="red">{{Name}}</span>
</div>
<div class="flex align-items-c h86 content1 bg-white mt10" v-if="mask=='1'">
<div
@@ -135,17 +135,20 @@ export default {
Name: '',
code: '',
isShowImg: true,
buName:''
}
},
created() {
// console.log('=======' + this.$route.params.parmas)
if (this.$route.params.parmas !== undefined) {
this.mask = JSON.parse(this.$route.params.parmas).mask
;(this.titleTime = JSON.parse(this.$route.params.parmas).date.slice(0, 7)),
(this.dateTime = JSON.parse(this.$route.params.parmas).date),
(this.unitName = JSON.parse(this.$route.params.parmas).unitName),
(this.Name = JSON.parse(this.$route.params.parmas).Name),
(this.code = JSON.parse(this.$route.params.parmas).code)
console.log(JSON.parse(window.localStorage.getItem('parmas')))
if (window.localStorage.getItem('parmas') !== null) {
this.mask = JSON.parse(window.localStorage.getItem('parmas')).mask
;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas')).date.slice(0, 7)),
(this.dateTime = JSON.parse(window.localStorage.getItem('parmas')).date),
(this.unitName = JSON.parse(window.localStorage.getItem('parmas')).unitName),
(this.Name = JSON.parse(window.localStorage.getItem('parmas')).Name),
(this.code = JSON.parse(window.localStorage.getItem('parmas')).code),
this.buName=JSON.parse(window.localStorage.getItem('parmas')).buName
}
if (this.mask !== '1') {
@@ -227,13 +230,14 @@ export default {
},
checkTeam(obj) {
console.log(obj)
localStorage.obj = JSON.stringify(this.obj)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/performance/PerformanceList/${JSON.stringify(obj)}`,
url: location.origin + `/#/performance/PerformanceList`,
},
routerInfo: {
path: `/performance/PerformanceList/${JSON.stringify(obj)}`,
path: `/performance/PerformanceList`,
},
})
},