| | |
| | | <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" |
| | |
| | | :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" |
| | |
| | | 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"]), |
| | |
| | | }, |
| | | mounted() { |
| | | this.initData(); |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | initData() { |
| | |
| | | const data = res.data.data; |
| | | this.pageParent.total = data.total; |
| | | this.dataParent = data.records; |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | this.dataChild = res.data.data; |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.loadingChild = false; |
| | | this.selectionClear(); |
| | | }); |
| | |
| | | }, |
| | | }; |
| | | </script> |
| | | |