jiaxing.zhou

refactor(reportingData): 优化日志数据加载逻辑

-移除了未使用的 TablePopover 组件导入
- 优化了 showTotalLog 方法,添加了 loading 状态控制
- 在日志数据为空时,及时关闭 loading 状态
...@@ -396,14 +396,8 @@ import RevokeDialog from "./revokeDialog.vue"; ...@@ -396,14 +396,8 @@ import RevokeDialog from "./revokeDialog.vue";
396 import TemplateDownloadDialog from "./templateDownloadDialog.vue"; 396 import TemplateDownloadDialog from "./templateDownloadDialog.vue";
397 import ExportDialog from "./exportDialog.vue"; 397 import ExportDialog from "./exportDialog.vue";
398 import BatchModify from "./batchModify.vue"; 398 import BatchModify from "./batchModify.vue";
399 -import TablePopover from "@/components/TablePopover/index.vue";
400 export default { 399 export default {
401 name: "ReportingData", 400 name: "ReportingData",
402 - computed: {
403 - TablePopover() {
404 - return TablePopover
405 - }
406 - },
407 components: { 401 components: {
408 DialogVue, 402 DialogVue,
409 RevokeDialog, 403 RevokeDialog,
...@@ -413,8 +407,10 @@ export default { ...@@ -413,8 +407,10 @@ export default {
413 }, 407 },
414 data() { 408 data() {
415 return { 409 return {
416 - allLogDataReceiptStatusPopoverType: false, // 控制日志弹窗的显示和隐藏 410 + // 控制日志弹窗的显示和隐藏
417 - selectedLogRow: {}, // 存储选中的日志数据 411 + allLogDataReceiptStatusPopoverType: false,
412 + // 存储选中的日志数据
413 + selectedLogRow: {},
418 sreachFormData: { 414 sreachFormData: {
419 billNo: "", 415 billNo: "",
420 logisticsNo: "", 416 logisticsNo: "",
...@@ -955,6 +951,7 @@ export default { ...@@ -955,6 +951,7 @@ export default {
955 }, 951 },
956 //申报日志 952 //申报日志
957 showTotalLog(row) { 953 showTotalLog(row) {
954 + this.$store.state.viewOption.loadingDatas = true;
958 this.selectedLogRow = row; 955 this.selectedLogRow = row;
959 this.$set(row, 'logLoading', true); 956 this.$set(row, 'logLoading', true);
960 957
...@@ -962,6 +959,10 @@ export default { ...@@ -962,6 +959,10 @@ export default {
962 .then((logData) => { 959 .then((logData) => {
963 this.$set(row, 'popoverData', logData); 960 this.$set(row, 'popoverData', logData);
964 961
962 + if(!this.selectedLogRow.popoverData.length){
963 + this.$store.state.viewOption.loadingDatas = false;
964 + }
965 +
965 // 手动触发状态更新 966 // 手动触发状态更新
966 this.$nextTick(() => { 967 this.$nextTick(() => {
967 // 强制设置弹窗状态为true 968 // 强制设置弹窗状态为true
......