zhanbo.xu

优化掉弹出关闭刷新的逻辑

...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 :destroy-on-close="true" 9 :destroy-on-close="true"
10 v-loading="loadings.dialogLoading" 10 v-loading="loadings.dialogLoading"
11 - @close="close" 11 + @close="close(false)"
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <el-form 14 <el-form
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
66 @click="submit" 66 @click="submit"
67 >确 定</el-button 67 >确 定</el-button
68 > 68 >
69 - <el-button class="entrySaveButton" @click="close">关 闭</el-button> 69 + <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button>
70 </div> 70 </div>
71 </el-dialog> 71 </el-dialog>
72 </template> 72 </template>
...@@ -143,7 +143,7 @@ export default { ...@@ -143,7 +143,7 @@ export default {
143 .then((res) => { 143 .then((res) => {
144 if (res.code === "200") { 144 if (res.code === "200") {
145 this.msgSuccess(res.message); 145 this.msgSuccess(res.message);
146 - this.close(); 146 + this.close(true);
147 } else { 147 } else {
148 this.alertWarningMsg(res.message); 148 this.alertWarningMsg(res.message);
149 this.loadings.dialogLoading = false; 149 this.loadings.dialogLoading = false;
...@@ -155,13 +155,13 @@ export default { ...@@ -155,13 +155,13 @@ export default {
155 }); 155 });
156 }, 156 },
157 157
158 - close() { 158 + close(flag) {
159 this.formData = { 159 this.formData = {
160 operatorCode: "", 160 operatorCode: "",
161 domesticTrafNo: "", 161 domesticTrafNo: "",
162 }; 162 };
163 this.loadings.dialogLoading = false; 163 this.loadings.dialogLoading = false;
164 - this.$emit("close"); 164 + this.$emit("close", flag);
165 }, 165 },
166 }, 166 },
167 }; 167 };
......
...@@ -467,9 +467,11 @@ export default { ...@@ -467,9 +467,11 @@ export default {
467 this.outerVisible = true; 467 this.outerVisible = true;
468 }, 468 },
469 469
470 - dialogClose() { 470 + dialogClose(flag = false) {
471 this.outerVisible = false; 471 this.outerVisible = false;
472 - this.search(1); 472 + if (flag) {
473 + this.search(0);
474 + }
473 }, 475 },
474 //分页 476 //分页
475 currentChange(val) { 477 currentChange(val) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 width="40%" 7 width="40%"
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 v-loading="loadings.dialogLoading" 9 v-loading="loadings.dialogLoading"
10 - @close="close" 10 + @close="close(false)"
11 > 11 >
12 <div class="modelItem"> 12 <div class="modelItem">
13 <el-form 13 <el-form
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
82 <el-button 82 <el-button
83 class="entrySaveButton" 83 class="entrySaveButton"
84 :disabled="loadings.uploadLoading" 84 :disabled="loadings.uploadLoading"
85 - @click="close" 85 + @click="close(false)"
86 >关 闭</el-button 86 >关 闭</el-button
87 > 87 >
88 </div> 88 </div>
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,7 @@ export default {
212 .then((res) => { 212 .then((res) => {
213 if (res.code === "200") { 213 if (res.code === "200") {
214 this.msgSuccess(res.message); 214 this.msgSuccess(res.message);
215 - this.close(); 215 + this.close(true);
216 } else { 216 } else {
217 this.alertWarningMsg(res.message); 217 this.alertWarningMsg(res.message);
218 this.loadings.dialogLoading = false; 218 this.loadings.dialogLoading = false;
...@@ -229,7 +229,7 @@ export default { ...@@ -229,7 +229,7 @@ export default {
229 .then((res) => { 229 .then((res) => {
230 if (res.code === "200") { 230 if (res.code === "200") {
231 this.msgSuccess(res.message); 231 this.msgSuccess(res.message);
232 - this.close(); 232 + this.close(true);
233 } else { 233 } else {
234 this.alertWarningMsg(res.message); 234 this.alertWarningMsg(res.message);
235 this.loadings.dialogLoading = false; 235 this.loadings.dialogLoading = false;
...@@ -240,13 +240,13 @@ export default { ...@@ -240,13 +240,13 @@ export default {
240 this.loadings.dialogLoading = false; 240 this.loadings.dialogLoading = false;
241 }); 241 });
242 }, 242 },
243 - close() { 243 + close(flag) {
244 this.formData = { 244 this.formData = {
245 availableUserCount: "", 245 availableUserCount: "",
246 cipherMachineNumber: "", 246 cipherMachineNumber: "",
247 ipAddress: "", 247 ipAddress: "",
248 }; 248 };
249 - this.$emit("close"); 249 + this.$emit("close", flag);
250 }, 250 },
251 }, 251 },
252 }; 252 };
......
...@@ -236,10 +236,12 @@ export default { ...@@ -236,10 +236,12 @@ export default {
236 this.outerVisible = true; 236 this.outerVisible = true;
237 this.activeData = val; 237 this.activeData = val;
238 }, 238 },
239 - dialogClose() { 239 + dialogClose(flag = false) {
240 this.outerVisible = false; 240 this.outerVisible = false;
241 this.activeData = null; 241 this.activeData = null;
242 - this.search(1); 242 + if (flag) {
243 + this.search(0);
244 + }
243 }, 245 },
244 //分页 246 //分页
245 currentChange(val) { 247 currentChange(val) {
...@@ -261,11 +263,11 @@ export default { ...@@ -261,11 +263,11 @@ export default {
261 } 263 }
262 }, 264 },
263 clear() { 265 clear() {
264 - this.sreachFormData={ 266 + this.sreachFormData = {
265 cipherMachineNumber: "", 267 cipherMachineNumber: "",
266 creationTime: [], 268 creationTime: [],
267 }; 269 };
268 - } 270 + },
269 }, 271 },
270 }; 272 };
271 </script> 273 </script>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 width="40%" 7 width="40%"
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 v-loading="loadings.dialogLoading" 9 v-loading="loadings.dialogLoading"
10 - @close="close" 10 + @close="close(false)"
11 > 11 >
12 <div 12 <div
13 class="modelItem" 13 class="modelItem"
...@@ -389,7 +389,7 @@ ...@@ -389,7 +389,7 @@
389 <div 389 <div
390 class="fileList" 390 class="fileList"
391 v-if=" 391 v-if="
392 - portConfig.TAO.certificateBase64 != '' || 392 + portConfig.TAO.certificateBase64 &&
393 portConfig.TAO.certificateName 393 portConfig.TAO.certificateName
394 " 394 "
395 > 395 >
...@@ -546,7 +546,7 @@ ...@@ -546,7 +546,7 @@
546 </el-select> 546 </el-select>
547 </Formitem> 547 </Formitem>
548 </el-col> 548 </el-col>
549 - <el-col :span="16" style="padding-right: 5px"> 549 + <el-col :span="16" style="padding-right: 5px" :key="refreshKey">
550 <div class="uploadItem"> 550 <div class="uploadItem">
551 <div class="uploadbox"> 551 <div class="uploadbox">
552 <el-button 552 <el-button
...@@ -571,7 +571,7 @@ ...@@ -571,7 +571,7 @@
571 <div 571 <div
572 class="fileList" 572 class="fileList"
573 v-if=" 573 v-if="
574 - portConfig.CAN.publicKeyBase64 != '' || 574 + portConfig.CAN.publicKeyBase64 &&
575 portConfig.CAN.publicKeyName 575 portConfig.CAN.publicKeyName
576 " 576 "
577 > 577 >
...@@ -590,7 +590,7 @@ ...@@ -590,7 +590,7 @@
590 <div class="uploadbox-option"> 590 <div class="uploadbox-option">
591 <el-popconfirm 591 <el-popconfirm
592 :title="$t('entry.upload.delTip')" 592 :title="$t('entry.upload.delTip')"
593 - @confirm="delQingdaoTypeDFile" 593 + @confirm="delGzTypeDFile"
594 > 594 >
595 <el-button slot="reference" type="text" 595 <el-button slot="reference" type="text"
596 >{{ $t("entry.upload.del") }} 596 >{{ $t("entry.upload.del") }}
...@@ -609,7 +609,8 @@ ...@@ -609,7 +609,8 @@
609 type="text" 609 type="text"
610 v-loading="loadings.gzRivateKeyLoading" 610 v-loading="loadings.gzRivateKeyLoading"
611 @click="gzRivateKeyUploadFile" 611 @click="gzRivateKeyUploadFile"
612 - >上传私钥 612 + >
613 + 上传私钥
613 </el-button> 614 </el-button>
614 <el-upload 615 <el-upload
615 class="upload-demo" 616 class="upload-demo"
...@@ -626,7 +627,7 @@ ...@@ -626,7 +627,7 @@
626 <div 627 <div
627 class="fileList" 628 class="fileList"
628 v-if=" 629 v-if="
629 - portConfig.CAN.privateKeyBase64 != '' || 630 + portConfig.CAN.privateKeyBase64 &&
630 portConfig.CAN.privateKeyName 631 portConfig.CAN.privateKeyName
631 " 632 "
632 > 633 >
...@@ -798,7 +799,7 @@ ...@@ -798,7 +799,7 @@
798 <el-button 799 <el-button
799 class="entrySaveButton" 800 class="entrySaveButton"
800 :disabled="loadings.uploadLoading" 801 :disabled="loadings.uploadLoading"
801 - @click="close" 802 + @click="close(false)"
802 >关 闭 803 >关 闭
803 </el-button> 804 </el-button>
804 </div> 805 </div>
...@@ -873,6 +874,7 @@ export default { ...@@ -873,6 +874,7 @@ export default {
873 methodOfSignature: "", // 加签方式 874 methodOfSignature: "", // 加签方式
874 }, 875 },
875 }, 876 },
877 + refreshKey: Date.now(),
876 choosePortCode: [], 878 choosePortCode: [],
877 formData: { 879 formData: {
878 config: {}, 880 config: {},
...@@ -1031,6 +1033,10 @@ export default { ...@@ -1031,6 +1033,10 @@ export default {
1031 // } 1033 // }
1032 }, 1034 },
1033 methods: { 1035 methods: {
1036 + extractBase64(dataUrl) {
1037 + const base64Match = dataUrl.match(/;base64,(.+)$/);
1038 + return base64Match ? base64Match[1] : dataUrl;
1039 + },
1034 fetchInfo(ojb) { 1040 fetchInfo(ojb) {
1035 getCustomerDetails({ 1041 getCustomerDetails({
1036 id: ojb.id, 1042 id: ojb.id,
...@@ -1119,7 +1125,9 @@ export default { ...@@ -1119,7 +1125,9 @@ export default {
1119 reader.onload = (e) => { 1125 reader.onload = (e) => {
1120 console.log(e); 1126 console.log(e);
1121 this.portConfig.TAO.certificateName = file.name; 1127 this.portConfig.TAO.certificateName = file.name;
1122 - this.portConfig.TAO.certificateBase64 = e.target.result; 1128 + this.portConfig.TAO.certificateBase64 = this.extractBase64(
1129 + e.target.result
1130 + );
1123 // let obj = { 1131 // let obj = {
1124 // file: e.target.result, 1132 // file: e.target.result,
1125 // name: file.name, 1133 // name: file.name,
...@@ -1134,7 +1142,9 @@ export default { ...@@ -1134,7 +1142,9 @@ export default {
1134 reader.onload = (e) => { 1142 reader.onload = (e) => {
1135 console.log(e); 1143 console.log(e);
1136 this.portConfig.CAN.publicKeyName = file.name; 1144 this.portConfig.CAN.publicKeyName = file.name;
1137 - this.portConfig.CAN.publicKeyBase64 = e.target.result; 1145 + this.portConfig.CAN.publicKeyBase64 = this.extractBase64(
1146 + e.target.result
1147 + );
1138 }; 1148 };
1139 }, 1149 },
1140 gzRivateKeyFileUpload({ file }) { 1150 gzRivateKeyFileUpload({ file }) {
...@@ -1142,9 +1152,11 @@ export default { ...@@ -1142,9 +1152,11 @@ export default {
1142 reader.readAsDataURL(file); 1152 reader.readAsDataURL(file);
1143 console.log(file); 1153 console.log(file);
1144 reader.onload = (e) => { 1154 reader.onload = (e) => {
1145 - console.log(e); 1155 + console.log("====>", e);
1146 this.portConfig.CAN.privateKeyName = file.name; 1156 this.portConfig.CAN.privateKeyName = file.name;
1147 - this.portConfig.CAN.privateKeyBase64 = e.target.result; 1157 + this.portConfig.CAN.privateKeyBase64 = this.extractBase64(
1158 + e.target.result
1159 + );
1148 }; 1160 };
1149 }, 1161 },
1150 1162
...@@ -1158,10 +1170,20 @@ export default { ...@@ -1158,10 +1170,20 @@ export default {
1158 delGzTypeDFile() { 1170 delGzTypeDFile() {
1159 this.portConfig.CAN.publicKeyName = null; 1171 this.portConfig.CAN.publicKeyName = null;
1160 this.portConfig.CAN.publicKeyBase64 = null; 1172 this.portConfig.CAN.publicKeyBase64 = null;
1173 + this.gzFileList = [];
1174 + this.$nextTick(() => {
1175 + this.refreshKey = Date.now();
1176 + });
1161 }, 1177 },
1162 gzRivateKeyTypeDFile() { 1178 gzRivateKeyTypeDFile() {
1179 + console.log("删除----------上传私钥");
1163 this.portConfig.CAN.privateKeyName = null; 1180 this.portConfig.CAN.privateKeyName = null;
1164 this.portConfig.CAN.privateKeyBase64 = null; 1181 this.portConfig.CAN.privateKeyBase64 = null;
1182 + this.gzRivateKeyFileList = [];
1183 + this.refreshKey = Date.now();
1184 + this.$nextTick(() => {
1185 + this.refreshKey = Date.now();
1186 + });
1165 }, 1187 },
1166 //删除证书 1188 //删除证书
1167 delCertificate() { 1189 delCertificate() {
...@@ -1269,7 +1291,7 @@ export default { ...@@ -1269,7 +1291,7 @@ export default {
1269 ); 1291 );
1270 } 1292 }
1271 this.msgSuccess("客户添加成功!"); 1293 this.msgSuccess("客户添加成功!");
1272 - this.close(); 1294 + this.close(true);
1273 } else { 1295 } else {
1274 this.alertWarningMsg(res.message); 1296 this.alertWarningMsg(res.message);
1275 this.loadings.dialogLoading = false; 1297 this.loadings.dialogLoading = false;
...@@ -1285,7 +1307,7 @@ export default { ...@@ -1285,7 +1307,7 @@ export default {
1285 .then((uploadRes) => { 1307 .then((uploadRes) => {
1286 if (uploadRes.code === "200") { 1308 if (uploadRes.code === "200") {
1287 // this.msgSuccess("客户添加和证书上传成功!"); 1309 // this.msgSuccess("客户添加和证书上传成功!");
1288 - this.close(); 1310 + this.close(true);
1289 } else { 1311 } else {
1290 this.alertWarningMsg(uploadRes.message); 1312 this.alertWarningMsg(uploadRes.message);
1291 } 1313 }
...@@ -1302,7 +1324,7 @@ export default { ...@@ -1302,7 +1324,7 @@ export default {
1302 .then((uploadRes) => { 1324 .then((uploadRes) => {
1303 if (uploadRes.code === "200") { 1325 if (uploadRes.code === "200") {
1304 // this.msgSuccess("客户添加和证书上传成功!"); 1326 // this.msgSuccess("客户添加和证书上传成功!");
1305 - this.close(); 1327 + this.close(true);
1306 } else { 1328 } else {
1307 this.alertWarningMsg(uploadRes.message); 1329 this.alertWarningMsg(uploadRes.message);
1308 } 1330 }
...@@ -1318,8 +1340,6 @@ export default { ...@@ -1318,8 +1340,6 @@ export default {
1318 updateCustomerData(val) 1340 updateCustomerData(val)
1319 .then((res) => { 1341 .then((res) => {
1320 if (res.code === "200") { 1342 if (res.code === "200") {
1321 - // this.msgSuccess(res.message);
1322 - // this.close();
1323 if (this.formData.file) { 1343 if (this.formData.file) {
1324 this.uploadCertificate( 1344 this.uploadCertificate(
1325 val.ecomEntCode, 1345 val.ecomEntCode,
...@@ -1339,7 +1359,7 @@ export default { ...@@ -1339,7 +1359,7 @@ export default {
1339 ); 1359 );
1340 } 1360 }
1341 this.msgSuccess("客户修改成功!"); 1361 this.msgSuccess("客户修改成功!");
1342 - this.close(); 1362 + this.close(true);
1343 } else { 1363 } else {
1344 this.alertWarningMsg(res.message); 1364 this.alertWarningMsg(res.message);
1345 this.loadings.dialogLoading = false; 1365 this.loadings.dialogLoading = false;
...@@ -1364,7 +1384,7 @@ export default { ...@@ -1364,7 +1384,7 @@ export default {
1364 // } 1384 // }
1365 // 1385 //
1366 // }, 1386 // },
1367 - close() { 1387 + close(flag = false) {
1368 this.formData = { 1388 this.formData = {
1369 id: null, 1389 id: null,
1370 certificare: "", 1390 certificare: "",
...@@ -1387,7 +1407,7 @@ export default { ...@@ -1387,7 +1407,7 @@ export default {
1387 this.choosePortCode = []; 1407 this.choosePortCode = [];
1388 this.clearPortConfig(this.portConfig); 1408 this.clearPortConfig(this.portConfig);
1389 // this.handleRemove(); 1409 // this.handleRemove();
1390 - this.$emit("close"); 1410 + this.$emit("close", flag);
1391 }, 1411 },
1392 clearPortConfig(obj) { 1412 clearPortConfig(obj) {
1393 for (let key in obj) { 1413 for (let key in obj) {
......
...@@ -386,10 +386,12 @@ export default { ...@@ -386,10 +386,12 @@ export default {
386 this.outerVisible = true; 386 this.outerVisible = true;
387 this.activeData = data; 387 this.activeData = data;
388 }, 388 },
389 - dialogClose() { 389 + dialogClose(flag = false) {
390 this.outerVisible = false; 390 this.outerVisible = false;
391 this.activeData = null; 391 this.activeData = null;
392 - this.search(1); 392 + if (flag) {
393 + this.search(0);
394 + }
393 }, 395 },
394 //分页 396 //分页
395 currentChange(val) { 397 currentChange(val) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 width="40%" 7 width="40%"
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 v-loading="loadings.dialogLoading" 9 v-loading="loadings.dialogLoading"
10 - @close="close" 10 + @close="close(false)"
11 > 11 >
12 <div class="modelItem"> 12 <div class="modelItem">
13 <el-form 13 <el-form
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
158 <el-button 158 <el-button
159 class="entrySaveButton" 159 class="entrySaveButton"
160 :disabled="loadings.uploadLoading" 160 :disabled="loadings.uploadLoading"
161 - @click="close" 161 + @click="close(false)"
162 >关 闭</el-button 162 >关 闭</el-button
163 > 163 >
164 </div> 164 </div>
...@@ -338,7 +338,7 @@ export default { ...@@ -338,7 +338,7 @@ export default {
338 .then((res) => { 338 .then((res) => {
339 if (res.code === "200") { 339 if (res.code === "200") {
340 this.msgSuccess(res.message); 340 this.msgSuccess(res.message);
341 - this.close(); 341 + this.close(true);
342 } else { 342 } else {
343 this.alertWarningMsg(res.message); 343 this.alertWarningMsg(res.message);
344 this.loadings.dialogLoading = false; 344 this.loadings.dialogLoading = false;
...@@ -355,7 +355,7 @@ export default { ...@@ -355,7 +355,7 @@ export default {
355 .then((res) => { 355 .then((res) => {
356 if (res.code === "200") { 356 if (res.code === "200") {
357 this.msgSuccess(res.message); 357 this.msgSuccess(res.message);
358 - this.close(); 358 + this.close(true);
359 } else { 359 } else {
360 this.alertWarningMsg(res.message); 360 this.alertWarningMsg(res.message);
361 this.loadings.dialogLoading = false; 361 this.loadings.dialogLoading = false;
...@@ -366,7 +366,7 @@ export default { ...@@ -366,7 +366,7 @@ export default {
366 this.loadings.dialogLoading = false; 366 this.loadings.dialogLoading = false;
367 }); 367 });
368 }, 368 },
369 - close() { 369 + close(flag = false) {
370 this.formData = { 370 this.formData = {
371 declarationPortCode: "", 371 declarationPortCode: "",
372 declarationUnit10: "", 372 declarationUnit10: "",
...@@ -377,7 +377,7 @@ export default { ...@@ -377,7 +377,7 @@ export default {
377 portCode: "", 377 portCode: "",
378 exportPortCode: "", 378 exportPortCode: "",
379 }; 379 };
380 - this.$emit("close"); 380 + this.$emit("close", flag);
381 }, 381 },
382 }, 382 },
383 }; 383 };
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
128 </template> 128 </template>
129 129
130 <script> 130 <script>
131 -import { getPortConfigList,getPortCodeList } from "@/api/system/port-api.js"; 131 +import { getPortConfigList, getPortCodeList } from "@/api/system/port-api.js";
132 // import { getPortList } from "@/api/system/user.js"; 132 // import { getPortList } from "@/api/system/user.js";
133 import DialogVue from "./dialog.vue"; 133 import DialogVue from "./dialog.vue";
134 export default { 134 export default {
...@@ -265,10 +265,12 @@ export default { ...@@ -265,10 +265,12 @@ export default {
265 this.outerVisible = true; 265 this.outerVisible = true;
266 this.activeData = val; 266 this.activeData = val;
267 }, 267 },
268 - dialogClose() { 268 + dialogClose(flag = false) {
269 this.outerVisible = false; 269 this.outerVisible = false;
270 this.activeData = null; 270 this.activeData = null;
271 - this.search(1); 271 + if (flag) {
272 + this.search(0);
273 + }
272 }, 274 },
273 //分页 275 //分页
274 currentChange(val) { 276 currentChange(val) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 :destroy-on-close="true" 9 :destroy-on-close="true"
10 v-loading="loadings.dialogLoading" 10 v-loading="loadings.dialogLoading"
11 - @close="close" 11 + @close="close(false)"
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <el-form 14 <el-form
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
122 @click="submit" 122 @click="submit"
123 >确 定</el-button 123 >确 定</el-button
124 > 124 >
125 - <el-button class="entrySaveButton" @click="close">关 闭</el-button> 125 + <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button>
126 </div> 126 </div>
127 </el-dialog> 127 </el-dialog>
128 </template> 128 </template>
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
255 .then((res) => { 255 .then((res) => {
256 if (res.code === "200") { 256 if (res.code === "200") {
257 this.msgSuccess(res.message); 257 this.msgSuccess(res.message);
258 - this.close(); 258 + this.close(true);
259 } else { 259 } else {
260 this.alertWarningMsg(res.message); 260 this.alertWarningMsg(res.message);
261 } 261 }
...@@ -266,7 +266,7 @@ export default { ...@@ -266,7 +266,7 @@ export default {
266 }); 266 });
267 }, 267 },
268 268
269 - close() { 269 + close(flag) {
270 this.formData = { 270 this.formData = {
271 receiptType: "", 271 receiptType: "",
272 orderNo: [], 272 orderNo: [],
...@@ -274,7 +274,7 @@ export default { ...@@ -274,7 +274,7 @@ export default {
274 }; 274 };
275 this.loadings.dialogLoading = false; 275 this.loadings.dialogLoading = false;
276 this.receiptInfo = ""; 276 this.receiptInfo = "";
277 - this.$emit("close"); 277 + this.$emit("close", flag);
278 }, 278 },
279 }, 279 },
280 }; 280 };
......
...@@ -252,9 +252,11 @@ export default { ...@@ -252,9 +252,11 @@ export default {
252 this.outerVisible = true; 252 this.outerVisible = true;
253 }, 253 },
254 254
255 - dialogClose() { 255 + dialogClose(flag = false) {
256 this.outerVisible = false; 256 this.outerVisible = false;
257 - this.search(1); 257 + if (flag) {
258 + this.search(0);
259 + }
258 }, 260 },
259 //分页 261 //分页
260 currentChange(val) { 262 currentChange(val) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 v-loading="loadings.dialogLoading" 9 v-loading="loadings.dialogLoading"
10 :element-loading-text="loadingText" 10 :element-loading-text="loadingText"
11 - @close="close" 11 + @close="close(false)"
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <div class="modelItem-title"> 14 <div class="modelItem-title">
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
105 <el-button 105 <el-button
106 class="entrySaveButton" 106 class="entrySaveButton"
107 :disabled="loadings.uploadLoading" 107 :disabled="loadings.uploadLoading"
108 - @click="close" 108 + @click="close(false)"
109 >关闭</el-button 109 >关闭</el-button
110 > 110 >
111 </div> 111 </div>
...@@ -214,7 +214,7 @@ export default { ...@@ -214,7 +214,7 @@ export default {
214 if (arr.length == 0) { 214 if (arr.length == 0) {
215 this.msgSuccess("上传成功!"); 215 this.msgSuccess("上传成功!");
216 this.handleRemove(); 216 this.handleRemove();
217 - this.close(); 217 + this.close(true);
218 this.uploadType = true; 218 this.uploadType = true;
219 } else { 219 } else {
220 this.errorData = arr; 220 this.errorData = arr;
...@@ -237,10 +237,10 @@ export default { ...@@ -237,10 +237,10 @@ export default {
237 this.fileList = []; 237 this.fileList = [];
238 }, 238 },
239 clearFile() {}, 239 clearFile() {},
240 - close() { 240 + close(flag = false) {
241 this.handleRemove(); 241 this.handleRemove();
242 - this.errorData = [] 242 + this.errorData = [];
243 - this.$emit("close", this.uploadType); 243 + this.$emit("close", flag);
244 }, 244 },
245 }, 245 },
246 }; 246 };
......
...@@ -679,9 +679,11 @@ export default { ...@@ -679,9 +679,11 @@ export default {
679 }); 679 });
680 }, 680 },
681 methods: { 681 methods: {
682 - dialogClose() { 682 + dialogClose(flag = false) {
683 this.timeVisible = false; 683 this.timeVisible = false;
684 - this.search(0); 684 + if (flag) {
685 + this.search(0);
686 + }
685 }, 687 },
686 calculateTableHeight() { 688 calculateTableHeight() {
687 this.tableMaxheight = window.innerHeight - 300; 689 this.tableMaxheight = window.innerHeight - 300;
...@@ -901,11 +903,10 @@ export default { ...@@ -901,11 +903,10 @@ export default {
901 this.dropdownName = val.name; 903 this.dropdownName = val.name;
902 this.dropdownCode = val.code; 904 this.dropdownCode = val.code;
903 }, 905 },
904 - close(val) { 906 + close(flag = false) {
905 - // if (val) { 907 + if (flag) {
906 - // this.search(1); 908 + this.search(0);
907 - // } 909 + }
908 - this.search(1);
909 this.outerVisible = false; 910 this.outerVisible = false;
910 this.tableMaxheight = window.innerHeight - 300; 911 this.tableMaxheight = window.innerHeight - 300;
911 this.$forceUpdate(); 912 this.$forceUpdate();
...@@ -913,8 +914,6 @@ export default { ...@@ -913,8 +914,6 @@ export default {
913 popoverChange(val) { 914 popoverChange(val) {
914 this.tableData = val.tableData; 915 this.tableData = val.tableData;
915 916
916 - console.log(val);
917 -
918 this.receiptApi(val.data.declareId, val.status) 917 this.receiptApi(val.data.declareId, val.status)
919 .then((res) => { 918 .then((res) => {
920 val.tableData.forEach((item) => { 919 val.tableData.forEach((item) => {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 :destroy-on-close="true" 9 :destroy-on-close="true"
10 v-loading="loadings.dialogLoading" 10 v-loading="loadings.dialogLoading"
11 - @close="close" 11 + @close="close(false)"
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <el-form 14 <el-form
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
57 @click="submit" 57 @click="submit"
58 >确 定</el-button 58 >确 定</el-button
59 > 59 >
60 - <el-button class="entrySaveButton" @click="close">关 闭</el-button> 60 + <el-button class="entrySaveButton" @click="close(false)">关 闭</el-button>
61 </div> 61 </div>
62 </el-dialog> 62 </el-dialog>
63 </template> 63 </template>
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
112 .then((res) => { 112 .then((res) => {
113 if (res.code === "200") { 113 if (res.code === "200") {
114 this.msgSuccess(res.message); 114 this.msgSuccess(res.message);
115 - this.close(); 115 + this.close(true);
116 } else { 116 } else {
117 this.alertWarningMsg(res.message); 117 this.alertWarningMsg(res.message);
118 this.loadings.dialogLoading = false; 118 this.loadings.dialogLoading = false;
...@@ -124,12 +124,12 @@ export default { ...@@ -124,12 +124,12 @@ export default {
124 }); 124 });
125 }, 125 },
126 126
127 - close() { 127 + close(flag) {
128 this.formData = { 128 this.formData = {
129 leaveTime: "", 129 leaveTime: "",
130 }; 130 };
131 this.loadings.dialogLoading = false; 131 this.loadings.dialogLoading = false;
132 - this.$emit("close"); 132 + this.$emit("close", flag);
133 }, 133 },
134 }, 134 },
135 }; 135 };
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 :destroy-on-close="true" 9 :destroy-on-close="true"
10 v-loading="loadings.dialogLoading" 10 v-loading="loadings.dialogLoading"
11 - @close="close" 11 + @close="close(false)"
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <el-form 14 <el-form
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
57 <el-button 57 <el-button
58 class="entrySaveButton" 58 class="entrySaveButton"
59 :disabled="loadings.uploadLoading" 59 :disabled="loadings.uploadLoading"
60 - @click="close" 60 + @click="close(false)"
61 >关 闭</el-button 61 >关 闭</el-button
62 > 62 >
63 </div> 63 </div>
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
100 } else if (this.type == "menuChange") { 100 } else if (this.type == "menuChange") {
101 this.formData = this.active; 101 this.formData = this.active;
102 this.searchTreeData(); 102 this.searchTreeData();
103 - this.loadCheckedKeys();//加载已绑定的菜单 103 + this.loadCheckedKeys(); //加载已绑定的菜单
104 } 104 }
105 } 105 }
106 }, 106 },
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
227 .then((res) => { 227 .then((res) => {
228 if (res.code === "200") { 228 if (res.code === "200") {
229 this.msgSuccess(res.message); 229 this.msgSuccess(res.message);
230 - this.close(); 230 + this.close(true);
231 } else { 231 } else {
232 this.alertWarningMsg(res.message); 232 this.alertWarningMsg(res.message);
233 this.loadings.dialogLoading = false; 233 this.loadings.dialogLoading = false;
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
244 .then((res) => { 244 .then((res) => {
245 if (res.code === "200") { 245 if (res.code === "200") {
246 this.msgSuccess(res.message); 246 this.msgSuccess(res.message);
247 - this.close(); 247 + this.close(true);
248 } else { 248 } else {
249 this.alertWarningMsg(res.message); 249 this.alertWarningMsg(res.message);
250 this.loadings.dialogLoading = false; 250 this.loadings.dialogLoading = false;
...@@ -261,8 +261,8 @@ export default { ...@@ -261,8 +261,8 @@ export default {
261 .then((res) => { 261 .then((res) => {
262 if (res.code === "200") { 262 if (res.code === "200") {
263 this.msgSuccess(res.message); 263 this.msgSuccess(res.message);
264 - this.close(); 264 + this.close(true);
265 - this.$store.dispatch('GenerateRoutes') 265 + this.$store.dispatch("GenerateRoutes");
266 } else { 266 } else {
267 this.alertWarningMsg(res.message); 267 this.alertWarningMsg(res.message);
268 this.loadings.dialogLoading = false; 268 this.loadings.dialogLoading = false;
...@@ -279,12 +279,12 @@ export default { ...@@ -279,12 +279,12 @@ export default {
279 arr = checked.checkedKeys.concat(checked.halfCheckedKeys); 279 arr = checked.checkedKeys.concat(checked.halfCheckedKeys);
280 this.treeCheckData = arr; 280 this.treeCheckData = arr;
281 }, 281 },
282 - close() { 282 + close(flag = false) {
283 this.formData = { 283 this.formData = {
284 roleName: "", 284 roleName: "",
285 }; 285 };
286 - this.checkedKeys = [] 286 + this.checkedKeys = [];
287 - this.$emit("close"); 287 + this.$emit("close", flag);
288 }, 288 },
289 // 加载已绑定的菜单 289 // 加载已绑定的菜单
290 loadCheckedKeys() { 290 loadCheckedKeys() {
...@@ -292,7 +292,9 @@ export default { ...@@ -292,7 +292,9 @@ export default {
292 getMenuByRoleId(this.formData.roleId) 292 getMenuByRoleId(this.formData.roleId)
293 .then((res) => { 293 .then((res) => {
294 if (res.code === "200") { 294 if (res.code === "200") {
295 - this.checkedKeys = res.data.filter(item => item.isBinding && (item.parentMenuId!=0 ) ).map(item => item.menuId); 295 + this.checkedKeys = res.data
296 + .filter((item) => item.isBinding && item.parentMenuId != 0)
297 + .map((item) => item.menuId);
296 //console.log('初始 checkedKeys:', this.checkedKeys); 298 //console.log('初始 checkedKeys:', this.checkedKeys);
297 this.$nextTick(() => { 299 this.$nextTick(() => {
298 this.$refs.tree.setCheckedKeys(this.checkedKeys); 300 this.$refs.tree.setCheckedKeys(this.checkedKeys);
...@@ -314,7 +316,6 @@ export default { ...@@ -314,7 +316,6 @@ export default {
314 this.treeCheckData = checkedKeys.concat(halfCheckedKeys); 316 this.treeCheckData = checkedKeys.concat(halfCheckedKeys);
315 //console.log('合并后的 treeCheckData:', this.treeCheckData); 317 //console.log('合并后的 treeCheckData:', this.treeCheckData);
316 }, 318 },
317 -
318 }, 319 },
319 }; 320 };
320 </script> 321 </script>
......
...@@ -191,10 +191,12 @@ export default { ...@@ -191,10 +191,12 @@ export default {
191 this.outerVisible = true; 191 this.outerVisible = true;
192 this.activeData = val; 192 this.activeData = val;
193 }, 193 },
194 - dialogClose() { 194 + dialogClose(flag = false) {
195 this.outerVisible = false; 195 this.outerVisible = false;
196 this.activeData = null; 196 this.activeData = null;
197 - this.search(1); 197 + if (flag) {
198 + this.search(0);
199 + }
198 }, 200 },
199 //分页 201 //分页
200 currentChange(val) { 202 currentChange(val) {
......
...@@ -242,7 +242,7 @@ export default { ...@@ -242,7 +242,7 @@ export default {
242 }; 242 };
243 getNewCustomerList(params) 243 getNewCustomerList(params)
244 .then((res) => { 244 .then((res) => {
245 - if (res.code == 200) { 245 + if (res.code == 200 && res.data?.[0]) {
246 this.ebcDataList = res.data; 246 this.ebcDataList = res.data;
247 } else { 247 } else {
248 this.ebcDataList = []; 248 this.ebcDataList = [];
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 :close-on-click-modal="false" 8 :close-on-click-modal="false"
9 :destroy-on-close="true" 9 :destroy-on-close="true"
10 v-loading="loadings.dialogLoading" 10 v-loading="loadings.dialogLoading"
11 - @close="close" 11 + @close="close(false)"
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <el-form 14 <el-form
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
131 <el-button 131 <el-button
132 class="entrySaveButton" 132 class="entrySaveButton"
133 :disabled="loadings.uploadLoading" 133 :disabled="loadings.uploadLoading"
134 - @click="close" 134 + @click="close(false)"
135 >关 闭</el-button 135 >关 闭</el-button
136 > 136 >
137 </div> 137 </div>
...@@ -253,7 +253,7 @@ export default { ...@@ -253,7 +253,7 @@ export default {
253 .then((res) => { 253 .then((res) => {
254 if (res.code === "200") { 254 if (res.code === "200") {
255 this.msgSuccess(res.message); 255 this.msgSuccess(res.message);
256 - this.close(); 256 + this.close(true);
257 } else { 257 } else {
258 this.alertWarningMsg(res.message); 258 this.alertWarningMsg(res.message);
259 this.loadings.dialogLoading = false; 259 this.loadings.dialogLoading = false;
...@@ -270,7 +270,7 @@ export default { ...@@ -270,7 +270,7 @@ export default {
270 .then((res) => { 270 .then((res) => {
271 if (res.code === "200") { 271 if (res.code === "200") {
272 this.msgSuccess(res.message); 272 this.msgSuccess(res.message);
273 - this.close(); 273 + this.close(true);
274 } else { 274 } else {
275 this.alertWarningMsg(res.message); 275 this.alertWarningMsg(res.message);
276 this.loadings.dialogLoading = false; 276 this.loadings.dialogLoading = false;
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
282 }); 282 });
283 }, 283 },
284 284
285 - close() { 285 + close(flag = false) {
286 this.formData = { 286 this.formData = {
287 operatorCode: "", 287 operatorCode: "",
288 operatorName: "", 288 operatorName: "",
...@@ -291,7 +291,7 @@ export default { ...@@ -291,7 +291,7 @@ export default {
291 operatorPersonInCharge: "", 291 operatorPersonInCharge: "",
292 contactNumber: "", 292 contactNumber: "",
293 }; 293 };
294 - this.$emit("close"); 294 + this.$emit("close", flag);
295 }, 295 },
296 }, 296 },
297 }; 297 };
......
...@@ -264,10 +264,12 @@ export default { ...@@ -264,10 +264,12 @@ export default {
264 this.activeData = JSON.parse(JSON.stringify(val)); 264 this.activeData = JSON.parse(JSON.stringify(val));
265 }, 265 },
266 266
267 - dialogClose() { 267 + dialogClose(flag = false) {
268 this.outerVisible = false; 268 this.outerVisible = false;
269 this.activeData = null; 269 this.activeData = null;
270 - this.search(1); 270 + if (flag) {
271 + this.search(0);
272 + }
271 }, 273 },
272 //分页 274 //分页
273 currentChange(val) { 275 currentChange(val) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 width="40%" 8 width="40%"
9 :close-on-click-modal="false" 9 :close-on-click-modal="false"
10 v-loading="loadings.dialogLoading" 10 v-loading="loadings.dialogLoading"
11 - @close="close" 11 + @close="close(false)"
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <el-form 14 <el-form
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
188 <el-button 188 <el-button
189 class="entrySaveButton" 189 class="entrySaveButton"
190 :disabled="loadings.uploadLoading" 190 :disabled="loadings.uploadLoading"
191 - @click="close" 191 + @click="close(false)"
192 >关 闭</el-button 192 >关 闭</el-button
193 > 193 >
194 </div> 194 </div>
...@@ -296,7 +296,7 @@ export default { ...@@ -296,7 +296,7 @@ export default {
296 isDataLoaded(val) { 296 isDataLoaded(val) {
297 if (val) { 297 if (val) {
298 this.loadings.dialogLoading = false; 298 this.loadings.dialogLoading = false;
299 - this.$emit('update:outerVisible', true); // 设置 outerVisible 为 true 299 + this.$emit("update:outerVisible", true); // 设置 outerVisible 为 true
300 } 300 }
301 }, 301 },
302 }, 302 },
...@@ -362,7 +362,7 @@ export default { ...@@ -362,7 +362,7 @@ export default {
362 .then((res) => { 362 .then((res) => {
363 if (res.code === "200") { 363 if (res.code === "200") {
364 this.msgSuccess(res.message); 364 this.msgSuccess(res.message);
365 - this.close(); 365 + this.close(true);
366 } else { 366 } else {
367 this.alertWarningMsg(res.message); 367 this.alertWarningMsg(res.message);
368 this.loadings.dialogLoading = false; 368 this.loadings.dialogLoading = false;
...@@ -379,8 +379,8 @@ export default { ...@@ -379,8 +379,8 @@ export default {
379 .then((res) => { 379 .then((res) => {
380 if (res.code === "200") { 380 if (res.code === "200") {
381 this.msgSuccess(res.message); 381 this.msgSuccess(res.message);
382 - this.close(); 382 + this.close(true);
383 - this.$store.dispatch('GenerateRoutes') 383 + this.$store.dispatch("GenerateRoutes");
384 } else { 384 } else {
385 this.alertWarningMsg(res.message); 385 this.alertWarningMsg(res.message);
386 this.loadings.dialogLoading = false; 386 this.loadings.dialogLoading = false;
...@@ -462,7 +462,7 @@ export default { ...@@ -462,7 +462,7 @@ export default {
462 this.customData = arr; 462 this.customData = arr;
463 this.value = select; 463 this.value = select;
464 }, 464 },
465 - close() { 465 + close(flag = false) {
466 this.formData = { 466 this.formData = {
467 id: null, 467 id: null,
468 username: "", 468 username: "",
...@@ -476,7 +476,7 @@ export default { ...@@ -476,7 +476,7 @@ export default {
476 this.rightSelect = []; 476 this.rightSelect = [];
477 this.value = []; 477 this.value = [];
478 this.rightSelectIdx = 0; 478 this.rightSelectIdx = 0;
479 - this.$emit("close"); 479 + this.$emit("close", flag);
480 }, 480 },
481 }, 481 },
482 }; 482 };
......
...@@ -301,10 +301,12 @@ export default { ...@@ -301,10 +301,12 @@ export default {
301 this.outerVisible = true; 301 this.outerVisible = true;
302 this.activeData = val; 302 this.activeData = val;
303 }, 303 },
304 - dialogClose() { 304 + dialogClose(flag) {
305 this.outerVisible = false; 305 this.outerVisible = false;
306 this.activeData = null; 306 this.activeData = null;
307 - this.search(1); 307 + if (flag) {
308 + this.search(0);
309 + }
308 }, 310 },
309 //分页 311 //分页
310 currentChange(val) { 312 currentChange(val) {
......