src/views/system/dict.vue
@@ -1,6 +1,13 @@
<template>
  <basic-container class="dict">
  <basic-container
    :class="[
      'dict',
      $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '',
    ]"
  >
    <avue-crud
      class="tablesss"
      :option="optionParent"
      :table-loading="loading"
      :data="dataParent"
@@ -55,9 +62,12 @@
      :title="`[${dictValue}]字典配置`"
      append-to-body
      :visible.sync="box"
      v-if="box"
      top="10px"
      width="1000px"
    >
      <avue-crud
        class="tablesssInSmail"
        :option="optionChild"
        :table-loading="loadingChild"
        :data="dataChild"
@@ -136,18 +146,35 @@
        pageSizes: [10, 30, 50, 100, 200],
        currentPage: 1,
        total: 0,
        ...this.$store.state.control.changePageSize,
      },
      pageChild: {
        pageSize: 10,
        pageSizes: [10, 30, 50, 100, 200],
        currentPage: 1,
        total: 0,
        ...this.$store.state.control.changePageSize,
      },
      dataParent: [],
      dataChild: [],
      optionParent: optionParent,
      optionChild: optionChild,
      optionParent: {
        ...optionParent,
        ...this.$store.state.control.clearOtherBut,
        menuWidth: 310,
      },
      optionChild: {
        ...optionChild,
        ...this.$store.state.control.clearOtherBut,
        menuWidth: 310,
      },
    };
  },
  watch: {
    box() {
      if (!this.box) {
        this.$store.commit("setWindowSizeHeightAdd");
      }
    },
  },
  computed: {
    ...mapGetters(["userInfo", "permission"]),
@@ -169,6 +196,7 @@
  },
  mounted() {
    this.initData();
    this.$store.commit("setWindowSizeHeightAdd");
  },
  methods: {
    initData() {
@@ -436,6 +464,7 @@
        const data = res.data.data;
        this.pageParent.total = data.total;
        this.dataParent = data.records;
        this.$store.commit("setWindowSizeHeightAdd");
        this.loading = false;
        this.selectionClear();
      });
@@ -449,6 +478,7 @@
        Object.assign(params, this.query)
      ).then((res) => {
        this.dataChild = res.data.data;
        this.$store.commit("setWindowSizeHeightAdd");
        this.loadingChild = false;
        this.selectionClear();
      });
@@ -456,4 +486,3 @@
  },
};
</script>