zhanbo.xu

feat: 根据需求优化和开发

...@@ -493,18 +493,21 @@ export default { ...@@ -493,18 +493,21 @@ export default {
493 value: "operationType", 493 value: "operationType",
494 width: "", 494 width: "",
495 align: "left", 495 align: "left",
496 + width: "120px",
496 }, 497 },
497 { 498 {
498 name: "提运单号", 499 name: "提运单号",
499 value: "billNo", 500 value: "billNo",
500 width: "", 501 width: "",
501 align: "left", 502 align: "left",
503 + width: "140px",
502 }, 504 },
503 { 505 {
504 name: "物流运单编号", 506 name: "物流运单编号",
505 value: "logisticsNo", 507 value: "logisticsNo",
506 width: "", 508 width: "",
507 align: "left", 509 align: "left",
510 + width: "200px",
508 }, 511 },
509 { 512 {
510 name: "修改内容", 513 name: "修改内容",
...@@ -548,25 +551,15 @@ export default { ...@@ -548,25 +551,15 @@ export default {
548 this.optionsVisible = false; 551 this.optionsVisible = false;
549 }, 552 },
550 showTotalLog(row) { 553 showTotalLog(row) {
551 - // this.$store.state.viewOption.loadingDatas = true;
552 this.selectedLogRow = row; 554 this.selectedLogRow = row;
555 + if (!this.optionsVisible) {
553 this.optionsVisible = true; 556 this.optionsVisible = true;
554 - // this.$set(row, "logLoading", true); 557 + } else {
555 - 558 + this.optionsVisible = false;
556 - // this.receiptApi(row.billNo, "allLogDataStatus").then((logData) => { 559 + this.$nextTick(() => {
557 - // this.$set(row, "popoverData", logData); 560 + this.optionsVisible = true;
558 - // if (!this.selectedLogRow.popoverData.length) { 561 + });
559 - // this.$store.state.viewOption.loadingDatas = false; 562 + }
560 - // }
561 -
562 - // // 手动触发状态更新
563 - // this.$nextTick(() => {
564 - // // 强制设置弹窗状态为true
565 - // row.allLogDataStatusPopoverType = true;
566 - // // 强制更新表格
567 - // this.tableData = [...this.tableData];
568 - // });
569 - // });
570 }, 563 },
571 //获取口岸子字典 564 //获取口岸子字典
572 searchPortDictData() { 565 searchPortDictData() {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 placement="left" 4 placement="left"
5 :visible-arrow="false" 5 :visible-arrow="false"
6 title="" 6 title=""
7 - width="750" 7 + width="850"
8 trigger="manual" 8 trigger="manual"
9 v-model="popperVisible" 9 v-model="popperVisible"
10 > 10 >
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
22 {{ rowData.billNo }} 22 {{ rowData.billNo }}
23 </div> 23 </div>
24 <el-table 24 <el-table
25 + v-loading="tableLoading"
25 :pagination="false" 26 :pagination="false"
26 :border="true" 27 :border="true"
27 tooltip-effect="dark" 28 tooltip-effect="dark"
...@@ -43,6 +44,7 @@ ...@@ -43,6 +44,7 @@
43 </el-tab-pane> 44 </el-tab-pane>
44 <el-tab-pane label="操作日志" name="2"> 45 <el-tab-pane label="操作日志" name="2">
45 <el-table 46 <el-table
47 + v-loading="tableLoading"
46 :pagination="false" 48 :pagination="false"
47 :border="true" 49 :border="true"
48 tooltip-effect="dark" 50 tooltip-effect="dark"
...@@ -63,11 +65,7 @@ ...@@ -63,11 +65,7 @@
63 </el-table> 65 </el-table>
64 </el-tab-pane> 66 </el-tab-pane>
65 </el-tabs> 67 </el-tabs>
66 - <el-button 68 + <el-button slot="reference" type="text">
67 - slot="reference"
68 - type="text"
69 - @click.stop="popoverChange(rowData, dataKey)"
70 - >
71 <slot name="buttonLabel"></slot> 69 <slot name="buttonLabel"></slot>
72 </el-button> 70 </el-button>
73 </el-popover> 71 </el-popover>
...@@ -129,6 +127,7 @@ export default { ...@@ -129,6 +127,7 @@ export default {
129 methods: { 127 methods: {
130 fetchData() { 128 fetchData() {
131 const { billNo } = this.rowData; 129 const { billNo } = this.rowData;
130 + this.tableLoading = true;
132 let objVal = { billNo: billNo }; 131 let objVal = { billNo: billNo };
133 this.logFunction(objVal) 132 this.logFunction(objVal)
134 .then((res) => { 133 .then((res) => {
...@@ -139,12 +138,16 @@ export default { ...@@ -139,12 +138,16 @@ export default {
139 }) 138 })
140 .catch((err) => { 139 .catch((err) => {
141 console.log(err); 140 console.log(err);
141 + })
142 + .finally(() => {
143 + this.tableLoading = false;
142 }); 144 });
143 }, 145 },
144 // tab点击事件 146 // tab点击事件
145 handleClick(tab, event) { 147 handleClick(tab, event) {
146 console.log(tab.name, event); 148 console.log(tab.name, event);
147 if (+tab.name === 2) { 149 if (+tab.name === 2) {
150 + this.tableLoading = true;
148 const { billNo } = this.rowData; 151 const { billNo } = this.rowData;
149 let objVal = { billNo: billNo }; 152 let objVal = { billNo: billNo };
150 this.optionsFunction(objVal) 153 this.optionsFunction(objVal)
...@@ -156,6 +159,9 @@ export default { ...@@ -156,6 +159,9 @@ export default {
156 }) 159 })
157 .catch((err) => { 160 .catch((err) => {
158 console.log(err); 161 console.log(err);
162 + })
163 + .finally(() => {
164 + this.tableLoading = false;
159 }); 165 });
160 } 166 }
161 }, 167 },
...@@ -164,63 +170,6 @@ export default { ...@@ -164,63 +170,6 @@ export default {
164 this.popperVisible = false; 170 this.popperVisible = false;
165 this.$emit("close"); 171 this.$emit("close");
166 }, 172 },
167 - //弹框状态改版
168 - popoverChange(data, type) {
169 - console.log(data, type);
170 - this.popoverClose();
171 - let arr = JSON.parse(JSON.stringify(this.tableData));
172 - arr.forEach((item) => {
173 - item.popoverData = [];
174 - if (data[this.idKey] != item[this.idKey]) {
175 - // item[`${type}PopoverLoading`] = false;
176 - item[`${type}PopoverType`] = false;
177 - } else {
178 - // item[`${type}PopoverLoading`] = true;
179 - item[`${type}PopoverType`] = !JSON.parse(
180 - JSON.stringify(item[`${type}PopoverType`])
181 - );
182 - }
183 - });
184 - if (!data[`${type}PopoverType`]) {
185 - this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY =
186 - "hidden";
187 - } else {
188 - this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto";
189 - }
190 - this.$emit("popoverChange", {
191 - tableData: arr,
192 - data: data,
193 - type: !data[`${type}PopoverType`],
194 - status: type,
195 - });
196 -
197 - this.$nextTick(() => {
198 - document.getElementsByClassName("el-table__row").forEach((dom1, i) => {
199 - if (i == data.index) {
200 - dom1.classList.add("activeRow");
201 - } else {
202 - dom1.classList.remove("hover-row");
203 - dom1.classList.remove("activeRow");
204 - }
205 - });
206 - let interval = setInterval(() => {
207 - if (
208 - document.getElementsByClassName(`popper${type}${data[this.idKey]}`)
209 - .length == 1
210 - ) {
211 - clearInterval(interval);
212 - }
213 - document
214 - .getElementsByClassName(`popper${type}${data[this.idKey]}`)
215 - .forEach((dom, index) => {
216 - if (index > 0) {
217 - dom.style.display = "none";
218 - dom.remove();
219 - }
220 - });
221 - }, 100);
222 - });
223 - },
224 }, 173 },
225 }; 174 };
226 </script> 175 </script>
......