Browse Source

depart bug

lyn7568 5 years ago
parent
commit
4f5637a645
3 changed files with 6 additions and 4 deletions
  1. 5 3
      src/components/CityPicker/index.vue
  2. 0 1
      src/main.js
  3. 1 0
      src/views/login/index.vue

+ 5 - 3
src/components/CityPicker/index.vue

93
      this.sheng = p.value
93
      this.sheng = p.value
94
      this.shi = ''
94
      this.shi = ''
95
      this.qu = ''
95
      this.qu = ''
96
      // this.shi = p.defaultChild.value
97
      this.E = p.defaultChild.id
96
      this.shi = p.defaultChild.value
97
      this.qu = p.defaultChild.defaultChild.value
98
      this.E = p.defaultChild.defaultChild.id
98
      this.$emit('paren', this.E)
99
      this.$emit('paren', this.E)
99
      // this.$emit('parenStr', this.shi)
100
      // this.$emit('parenStr', this.shi)
100
    },
101
    },
101
    choseCity: function(e) {
102
    choseCity: function(e) {
102
      var p = this.citydata[e.slice(0, 2) + '0000'].children[e]
103
      var p = this.citydata[e.slice(0, 2) + '0000'].children[e]
103
      this.blockArr = p.children
104
      this.blockArr = p.children
104
      this.E = p.id
105
      this.shi = p.value
105
      this.shi = p.value
106
      this.qu = p.defaultChild.value
107
      this.E = p.defaultChild.id
106
      this.$emit('paren', this.E)
108
      this.$emit('paren', this.E)
107
      // this.$emit('parenStr', this.shi)
109
      // this.$emit('parenStr', this.shi)
108
    },
110
    },

+ 0 - 1
src/main.js

31
  store,
31
  store,
32
  created() {
32
  created() {
33
    this.$store.dispatch('getCityData')
33
    this.$store.dispatch('getCityData')
34
    this.$store.dispatch('getDictDepart')
35
  },
34
  },
36
  render: h => h(App)
35
  render: h => h(App)
37
})
36
})

+ 1 - 0
src/views/login/index.vue

92
                } else {
92
                } else {
93
                  roles = ['0']
93
                  roles = ['0']
94
                }
94
                }
95
                this.$store.dispatch('getDictDepart')
95
                this.$store.dispatch('GenerateRoutes', { roles }).then(() => {
96
                this.$store.dispatch('GenerateRoutes', { roles }).then(() => {
96
                  this.$router.addRoutes(this.$store.getters.addRouters)
97
                  this.$router.addRoutes(this.$store.getters.addRouters)
97
                  this.$router.push({ path: '/' })
98
                  this.$router.push({ path: '/' })