zhanbo.xu

feat: 新增法定单位

......@@ -31,9 +31,16 @@
:pageSizes="[20, 30, 50, 100]"
:totalCount="0"
:loading="tableLoading"
:emptyText="(loadingDatas && !rowData.popoverData.length) ? '数据加载中' : $t('portEntry.emptyText')"
height="350px"
maxHeight="500px"
:emptyText="
loadingDatas &&
rowData &&
rowData.popoverData &&
!rowData.popoverData.length
? '数据加载中'
: $t('portEntry.emptyText')
"
:height="tableHeight + 'px'"
:maxHeight="tableHeight + 'px'"
rowKey="id"
>
</Table>
......@@ -82,20 +89,31 @@ export default {
},
data() {
return {
tableLoading: false
tableLoading: false,
tableHeight: 350,
};
},
computed:{
loadingDatas(){
return this.$store.state.viewOption.loadingDatas
}
computed: {
loadingDatas() {
return this.$store.state.viewOption.loadingDatas;
},
},
mounted() {
this.calculateTableHeight();
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
},
methods: {
calculateTableHeight() {
this.tableHeight = window.innerHeight - 300;
},
//弹框关闭
popoverClose() {
this.$emit("popoverClose");
this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto";
this.$store.dispatch('setLoadingState', true)
this.$store.dispatch("setLoadingState", true);
},
//弹框状态改版
popoverChange(data, type) {
......
......@@ -868,7 +868,7 @@ export default {
},
methods: {
mapDicDatas(dicArr, code) {
if (code != "") {
if (code != "" && code) {
return dicArr.filter((item) => item.itemCode == code)[0]
.itemChineseName;
} else {
......
This diff is collapsed. Click to expand it.