工业园楼栋扫码

master
laozt 1 year ago
parent ab49fcf5e1
commit 955c644cf3

@ -26,7 +26,7 @@ router.beforeEach((to, from, next) => {
text: to.name == '企业详情' ? '工业园' : to.name == '企业详情2' ? '楼栋': '企业', text: to.name == '企业详情' ? '工业园' : to.name == '企业详情2' ? '楼栋': '企业',
isShow: to.query.isShow || to.params.isShow, isShow: to.query.isShow || to.params.isShow,
}) })
console.log(to) // console.log(to)
next() next()
}) })

@ -15,10 +15,14 @@ export default new Vuex.Store({
}, },
parkId: null, parkId: null,
enterpriseId: null, enterpriseId: null,
buildingId: null,
}, },
mutations: { mutations: {
SET_PERK_ID(state, parkId) { SET_PERK_ID(state, parkId) {
state.parkId = parkId state.parkId = parkId
},
SET_BUILDING_ID(state, buildingId) {
state.buildingId = buildingId
}, },
SET_ENTERPRISE_ID(state, enterpriseId) { SET_ENTERPRISE_ID(state, enterpriseId) {
state.enterpriseId = enterpriseId state.enterpriseId = enterpriseId

@ -63,6 +63,8 @@ export default {
getList() { getList() {
this.querParams.buildingId = this.$route.query.buildingId this.querParams.buildingId = this.$route.query.buildingId
this.querParams.parkId = this.$route.query.parkId this.querParams.parkId = this.$route.query.parkId
this.$store.commit('SET_PERK_ID', this.$route.query.parkId)
this.$store.commit('SET_BUILDING_ID', this.$route.query.buildingId)
listEnterpriseBuildPark(this.querParams).then((res) => { listEnterpriseBuildPark(this.querParams).then((res) => {
this.enterpriseList = this.enterpriseList.concat(res.rows) this.enterpriseList = this.enterpriseList.concat(res.rows)

@ -50,8 +50,8 @@ export default {
this.$router.replace({ this.$router.replace({
path: '/build', path: '/build',
query: { query: {
buildingId: null, buildingId: this.$store.state.buildingId,
parkId: null, parkId: this.$store.state.parkId,
}, },
}) })
} else { } else {

Loading…
Cancel
Save