소스 검색

修改bug

QuKatie 3 년 전
부모
커밋
0fb311860f
1개의 변경된 파일7개의 추가작업 그리고 11개의 파일을 삭제
  1. 7 11
      src/components/price-Library/main.vue

+ 7 - 11
src/components/price-Library/main.vue

@@ -69,7 +69,7 @@ import _ from "lodash";
 export default {
   data() {
     return {
-      treeForm:{},
+      treeForm: {},
       treeOption: {
         addBtn: false,
         menu: false,
@@ -113,6 +113,12 @@ export default {
         res.data.data.records;
       this.treeData = res.data.data.records;
     });
+    if (localStorage.getItem("roleName") == "贸易") {
+      this.findObject(this.tableOption.column, "taxRate").hide = true;
+      this.findObject(this.tableOption.column, "taxRate").showColumn = false;
+      this.findObject(this.tableOption.column, "price").hide = true;
+      this.findObject(this.tableOption.column, "price").showColumn = false;
+    }
   },
   methods: {
     init(status, partreData) {
@@ -181,16 +187,6 @@ export default {
       this.partreData = null;
       this.$refs.crud.toggleSelection();
     }
-  },
-  watch: {
-    tableOption: function() {
-      if (localStorage.getItem("roleName") == "贸易") {
-        this.findObject(this.tableOption.column, "taxRate").hide = true;
-        this.findObject(this.tableOption.column, "taxRate").showColumn = false;
-        this.findObject(this.tableOption.column, "price").hide = true;
-        this.findObject(this.tableOption.column, "price").showColumn = false;
-      }
-    }
   }
 };
 </script>