lyn7568 преди 5 години
родител
ревизия
4f5637a645
променени са 3 файла, в които са добавени 6 реда и са изтрити 4 реда
  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,16 +93,18 @@ export default {
93 93
      this.sheng = p.value
94 94
      this.shi = ''
95 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 99
      this.$emit('paren', this.E)
99 100
      // this.$emit('parenStr', this.shi)
100 101
    },
101 102
    choseCity: function(e) {
102 103
      var p = this.citydata[e.slice(0, 2) + '0000'].children[e]
103 104
      this.blockArr = p.children
104
      this.E = p.id
105 105
      this.shi = p.value
106
      this.qu = p.defaultChild.value
107
      this.E = p.defaultChild.id
106 108
      this.$emit('paren', this.E)
107 109
      // this.$emit('parenStr', this.shi)
108 110
    },

+ 0 - 1
src/main.js

@ -31,7 +31,6 @@ new Vue({
31 31
  store,
32 32
  created() {
33 33
    this.$store.dispatch('getCityData')
34
    this.$store.dispatch('getDictDepart')
35 34
  },
36 35
  render: h => h(App)
37 36
})

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

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