智慧农业后台管理页面
guoshilong
2022-11-08 082613d446e29e4ec1c16bfaa52345106a498b23
src/views/traceability/traceability.vue
@@ -126,6 +126,9 @@
        addBtn:false,
        editBtn:false,
        delBtn:false,
        refreshBtn:false,
        columnBtn:false,
        searchShowBtn:false,
        column: [
          {
            label: "产品名称",
@@ -212,8 +215,16 @@
  created() {
    this.initData();
  },
  watch: {
      '$farmId':{
      handler (newName, oldName) {
          this.query={}
          this.onLoad(this.page)
      }
    }
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    ...mapGetters(["permission", "userInfo","$farmId"]),
    // permissionList() {
    //   return {
    //     addBtn: this.vaildData(this.permission.social_add, true),
@@ -381,11 +392,12 @@
      this.onLoad(this.page, this.query);
    },
    onLoads(){
      this.onLoad(this.page, this.query);
      // this.onLoad(this.page, this.query);
      this.onLoad(this.page);
    },
    onLoad(page, params = {}) {
      params['tenantId'] = this.userInfo.tenant_id;
      params['deptId'] = this.userInfo.dept_id;
      params.deptId = this.$farmId
      this.loading = true;
      getList(
        page.currentPage,
@@ -403,5 +415,5 @@
};
</script>
<style>
<style >
</style>