zhanbo.xu

feat: 根据需求优化和开发

......@@ -493,18 +493,21 @@ export default {
value: "operationType",
width: "",
align: "left",
width: "120px",
},
{
name: "提运单号",
value: "billNo",
width: "",
align: "left",
width: "140px",
},
{
name: "物流运单编号",
value: "logisticsNo",
width: "",
align: "left",
width: "200px",
},
{
name: "修改内容",
......@@ -548,25 +551,15 @@ export default {
this.optionsVisible = false;
},
showTotalLog(row) {
// this.$store.state.viewOption.loadingDatas = true;
this.selectedLogRow = row;
this.optionsVisible = true;
// this.$set(row, "logLoading", true);
// this.receiptApi(row.billNo, "allLogDataStatus").then((logData) => {
// this.$set(row, "popoverData", logData);
// if (!this.selectedLogRow.popoverData.length) {
// this.$store.state.viewOption.loadingDatas = false;
// }
// // 手动触发状态更新
// this.$nextTick(() => {
// // 强制设置弹窗状态为true
// row.allLogDataStatusPopoverType = true;
// // 强制更新表格
// this.tableData = [...this.tableData];
// });
// });
if (!this.optionsVisible) {
this.optionsVisible = true;
} else {
this.optionsVisible = false;
this.$nextTick(() => {
this.optionsVisible = true;
});
}
},
//获取口岸子字典
searchPortDictData() {
......
......@@ -4,7 +4,7 @@
placement="left"
:visible-arrow="false"
title=""
width="750"
width="850"
trigger="manual"
v-model="popperVisible"
>
......@@ -22,6 +22,7 @@
{{ rowData.billNo }}
</div>
<el-table
v-loading="tableLoading"
:pagination="false"
:border="true"
tooltip-effect="dark"
......@@ -43,6 +44,7 @@
</el-tab-pane>
<el-tab-pane label="操作日志" name="2">
<el-table
v-loading="tableLoading"
:pagination="false"
:border="true"
tooltip-effect="dark"
......@@ -63,11 +65,7 @@
</el-table>
</el-tab-pane>
</el-tabs>
<el-button
slot="reference"
type="text"
@click.stop="popoverChange(rowData, dataKey)"
>
<el-button slot="reference" type="text">
<slot name="buttonLabel"></slot>
</el-button>
</el-popover>
......@@ -129,6 +127,7 @@ export default {
methods: {
fetchData() {
const { billNo } = this.rowData;
this.tableLoading = true;
let objVal = { billNo: billNo };
this.logFunction(objVal)
.then((res) => {
......@@ -139,12 +138,16 @@ export default {
})
.catch((err) => {
console.log(err);
})
.finally(() => {
this.tableLoading = false;
});
},
// tab点击事件
handleClick(tab, event) {
console.log(tab.name, event);
if (+tab.name === 2) {
this.tableLoading = true;
const { billNo } = this.rowData;
let objVal = { billNo: billNo };
this.optionsFunction(objVal)
......@@ -156,6 +159,9 @@ export default {
})
.catch((err) => {
console.log(err);
})
.finally(() => {
this.tableLoading = false;
});
}
},
......@@ -164,63 +170,6 @@ export default {
this.popperVisible = false;
this.$emit("close");
},
//弹框状态改版
popoverChange(data, type) {
console.log(data, type);
this.popoverClose();
let arr = JSON.parse(JSON.stringify(this.tableData));
arr.forEach((item) => {
item.popoverData = [];
if (data[this.idKey] != item[this.idKey]) {
// item[`${type}PopoverLoading`] = false;
item[`${type}PopoverType`] = false;
} else {
// item[`${type}PopoverLoading`] = true;
item[`${type}PopoverType`] = !JSON.parse(
JSON.stringify(item[`${type}PopoverType`])
);
}
});
if (!data[`${type}PopoverType`]) {
this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY =
"hidden";
} else {
this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto";
}
this.$emit("popoverChange", {
tableData: arr,
data: data,
type: !data[`${type}PopoverType`],
status: type,
});
this.$nextTick(() => {
document.getElementsByClassName("el-table__row").forEach((dom1, i) => {
if (i == data.index) {
dom1.classList.add("activeRow");
} else {
dom1.classList.remove("hover-row");
dom1.classList.remove("activeRow");
}
});
let interval = setInterval(() => {
if (
document.getElementsByClassName(`popper${type}${data[this.idKey]}`)
.length == 1
) {
clearInterval(interval);
}
document
.getElementsByClassName(`popper${type}${data[this.idKey]}`)
.forEach((dom, index) => {
if (index > 0) {
dom.style.display = "none";
dom.remove();
}
});
}, 100);
});
},
},
};
</script>
......