Browse Source

路由页问题

master
wanggongfeng 6 years ago
parent
commit
54cb0c406a
  1. 18
      src/views/modules/workRecord/monthrecordinfoDetail.vue

18
src/views/modules/workRecord/monthrecordinfoDetail.vue

@ -109,7 +109,11 @@ export default {
isShowCaseBtn: false, isShowCaseBtn: false,
isShowGridBtn: false, isShowGridBtn: false,
isShowPersonBtn: false, isShowPersonBtn: false,
isShowSortBtn: false isShowSortBtn: false,
caseId: '',
gridId: '',
personId: '',
queryDisabled: ''
} }
}, },
computed: { computed: {
@ -131,6 +135,7 @@ export default {
MapSelect MapSelect
}, },
mounted () { mounted () {
this.queryDisabled = this.$route.query.disabled
if (this.$route.query.disabled === '0') { if (this.$route.query.disabled === '0') {
this.pageDisabled = false this.pageDisabled = false
this.hideUpload = false this.hideUpload = false
@ -147,14 +152,17 @@ export default {
if (this.$route.query.caseId !== '' && this.$route.query.caseId != null) { if (this.$route.query.caseId !== '' && this.$route.query.caseId != null) {
// //
this.isShowCaseBtn = true this.isShowCaseBtn = true
this.caseId = this.$route.query.caseId
} }
if (this.$route.query.gridId !== '' && this.$route.query.gridId != null) { if (this.$route.query.gridId !== '' && this.$route.query.gridId != null) {
// //
this.isShowGridBtn = true this.isShowGridBtn = true
this.gridId = this.$route.query.gridId
} }
if (this.$route.query.personId !== '' && this.$route.query.personId != null) { if (this.$route.query.personId !== '' && this.$route.query.personId != null) {
// //
this.isShowPersonBtn = true this.isShowPersonBtn = true
this.personId = this.$route.query.personId
} }
if (this.$route.query.isHaveSort === '1') { if (this.$route.query.isHaveSort === '1') {
// //
@ -164,19 +172,19 @@ export default {
methods: { methods: {
goToCaseHandle () { goToCaseHandle () {
this.$parent.selectComponent = 'MonthexcellentcaseDetail' this.$parent.selectComponent = 'MonthexcellentcaseDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.$route.query.caseId, disabled: this.$route.query.disabled, infoId: this.$route.query.id } }) this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.caseId, disabled: this.queryDisabled, infoId: this.dataForm.id } })
}, },
goToGridHandle () { goToGridHandle () {
this.$parent.selectComponent = 'MonthexcellentgridDetail' this.$parent.selectComponent = 'MonthexcellentgridDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.$route.query.gridId, disabled: this.$route.query.disabled, infoId: this.$route.query.id } }) this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.gridId, disabled: this.queryDisabled, infoId: this.dataForm.id } })
}, },
goToPersonHandle () { goToPersonHandle () {
this.$parent.selectComponent = 'MonthexcellentpersonDetail' this.$parent.selectComponent = 'MonthexcellentpersonDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.$route.query.personId, disabled: this.$route.query.disabled, infoId: this.$route.query.id } }) this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.personId, disabled: this.queryDisabled, infoId: this.dataForm.id } })
}, },
goToSortHandle () { goToSortHandle () {
this.$parent.selectComponent = 'MonthgridsortDetail' this.$parent.selectComponent = 'MonthgridsortDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { isAdd: '2', disabled: this.$route.query.disabled, infoId: this.$route.query.id } }) this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { isAdd: '2', disabled: this.queryDisabled, infoId: this.dataForm.id } })
}, },
init () { init () {
this.dataForm.id = this.$route.query.id this.dataForm.id = this.$route.query.id

Loading…
Cancel
Save