Cheng преди 3 години
родител
ревизия
c2f44f73c6
променени са 2 файла, в които са добавени 5 реда и са изтрити 11 реда
  1. 4 10
      src/views/client/index.vue
  2. 1 1
      src/views/layout/index.vue

+ 4 - 10
src/views/client/index.vue

@@ -16,8 +16,8 @@
       <el-table-column prop="address" label="联系人地址" align="center" show-overflow-tooltip></el-table-column>
       <el-table-column prop="type" label="类型" align="center" show-overflow-tooltip>
         <template slot-scope="scope">
-          <span>
-            {{(select.filter(item=>item.dictChildValue==scope.row.type))[0].dictChildLabel}}
+          <span v-if="dictionaries">
+            {{(dictionaries.filter(item=>item.dictChildValue==scope.row.type))[0].dictChildLabel}}
           </span>
         </template>
       </el-table-column>
@@ -251,13 +251,12 @@ export default {
   mounted() {
     this.getList()
     this.getFunction()
-    this.translate()
     // console.log(this.select)
   },
     computed: {
     dictionaries() {
-      console.log(this.$store.state.admin.dictionaries)
-      return this.$store.state.admin.dictionaries
+      // console.log(this.$store.state.admin.dictionaries)
+      return this.$store.state.admin.dictionaries.TENANT_TYPE
     },
    
   },
@@ -288,11 +287,6 @@ export default {
       this.showvisible = false
       this.pswdshow = false
     },
-    translate() {
-      for (let i = 0; i < this.select.length; i++) {
-        this.trans.push(this.select[i].dictChildLabel)
-      }
-    },
     getList() {
       this.loading = true
       this.$api.getTenantList(this.queryParams).then(response => {

+ 1 - 1
src/views/layout/index.vue

@@ -154,7 +154,7 @@ export default {
     },
     getUserinfo() {
       this.$api.getUserInfo().then(response => {
-        console.log(response)
+        // console.log(response)
         localStorage.tenant = response.data.tenantId
         this.$store.commit('SET_ADMIN_USERINFO', response.data)
       })